//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension Athena {
    // MARK: Enums

    public enum AuthenticationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case directoryIdentity = "DIRECTORY_IDENTITY"
        public var description: String { return self.rawValue }
    }

    public enum CalculationExecutionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case canceling = "CANCELING"
        case completed = "COMPLETED"
        case created = "CREATED"
        case creating = "CREATING"
        case failed = "FAILED"
        case queued = "QUEUED"
        case running = "RUNNING"
        public var description: String { return self.rawValue }
    }

    public enum CapacityAllocationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case pending = "PENDING"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum CapacityReservationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case cancelled = "CANCELLED"
        case cancelling = "CANCELLING"
        case failed = "FAILED"
        case pending = "PENDING"
        case updatePending = "UPDATE_PENDING"
        public var description: String { return self.rawValue }
    }

    public enum ColumnNullable: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case notNull = "NOT_NULL"
        case nullable = "NULLABLE"
        case unknown = "UNKNOWN"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bigquery = "BIGQUERY"
        case cmdb = "CMDB"
        case datalakegen2 = "DATALAKEGEN2"
        case db2 = "DB2"
        case db2as400 = "DB2AS400"
        case documentdb = "DOCUMENTDB"
        case dynamodb = "DYNAMODB"
        case googlecloudstorage = "GOOGLECLOUDSTORAGE"
        case hbase = "HBASE"
        case mysql = "MYSQL"
        case opensearch = "OPENSEARCH"
        case oracle = "ORACLE"
        case postgresql = "POSTGRESQL"
        case redshift = "REDSHIFT"
        case saphana = "SAPHANA"
        case snowflake = "SNOWFLAKE"
        case sqlserver = "SQLSERVER"
        case synapse = "SYNAPSE"
        case timestream = "TIMESTREAM"
        case tpcds = "TPCDS"
        public var description: String { return self.rawValue }
    }

    public enum DataCatalogStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case createComplete = "CREATE_COMPLETE"
        case createFailed = "CREATE_FAILED"
        case createFailedCleanupComplete = "CREATE_FAILED_CLEANUP_COMPLETE"
        case createFailedCleanupFailed = "CREATE_FAILED_CLEANUP_FAILED"
        case createFailedCleanupInProgress = "CREATE_FAILED_CLEANUP_IN_PROGRESS"
        case createInProgress = "CREATE_IN_PROGRESS"
        case deleteComplete = "DELETE_COMPLETE"
        case deleteFailed = "DELETE_FAILED"
        case deleteInProgress = "DELETE_IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum DataCatalogType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case federated = "FEDERATED"
        case glue = "GLUE"
        case hive = "HIVE"
        case lambda = "LAMBDA"
        public var description: String { return self.rawValue }
    }

    public enum EncryptionOption: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cseKms = "CSE_KMS"
        case sseKms = "SSE_KMS"
        case sseS3 = "SSE_S3"
        public var description: String { return self.rawValue }
    }

    public enum ExecutorState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case created = "CREATED"
        case creating = "CREATING"
        case failed = "FAILED"
        case registered = "REGISTERED"
        case terminated = "TERMINATED"
        case terminating = "TERMINATING"
        public var description: String { return self.rawValue }
    }

    public enum ExecutorType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case coordinator = "COORDINATOR"
        case gateway = "GATEWAY"
        case worker = "WORKER"
        public var description: String { return self.rawValue }
    }

    public enum NotebookType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ipynb = "IPYNB"
        public var description: String { return self.rawValue }
    }

    public enum QueryExecutionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelled = "CANCELLED"
        case failed = "FAILED"
        case queued = "QUEUED"
        case running = "RUNNING"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum QueryResultType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case dataManifest = "DATA_MANIFEST"
        case dataRows = "DATA_ROWS"
        public var description: String { return self.rawValue }
    }

    public enum S3AclOption: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bucketOwnerFullControl = "BUCKET_OWNER_FULL_CONTROL"
        public var description: String { return self.rawValue }
    }

    public enum SessionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case busy = "BUSY"
        case created = "CREATED"
        case creating = "CREATING"
        case degraded = "DEGRADED"
        case failed = "FAILED"
        case idle = "IDLE"
        case terminated = "TERMINATED"
        case terminating = "TERMINATING"
        public var description: String { return self.rawValue }
    }

    public enum StatementType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ddl = "DDL"
        case dml = "DML"
        case utility = "UTILITY"
        public var description: String { return self.rawValue }
    }

    public enum ThrottleReason: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case concurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum WorkGroupState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AclConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon S3 canned ACL that Athena should specify when storing query results, including data files inserted by Athena as the result of statements like CTAS or INSERT INTO. Currently the only supported canned ACL is BUCKET_OWNER_FULL_CONTROL. If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide.
        public let s3AclOption: S3AclOption

        @inlinable
        public init(s3AclOption: S3AclOption) {
            self.s3AclOption = s3AclOption
        }

        private enum CodingKeys: String, CodingKey {
            case s3AclOption = "S3AclOption"
        }
    }

    public struct ApplicationDPUSizes: AWSDecodableShape {
        /// The name of the supported application runtime (for example, Athena notebook version 1).
        public let applicationRuntimeId: String?
        /// A list of the supported DPU sizes that the application runtime supports.
        public let supportedDPUSizes: [Int]?

        @inlinable
        public init(applicationRuntimeId: String? = nil, supportedDPUSizes: [Int]? = nil) {
            self.applicationRuntimeId = applicationRuntimeId
            self.supportedDPUSizes = supportedDPUSizes
        }

        private enum CodingKeys: String, CodingKey {
            case applicationRuntimeId = "ApplicationRuntimeId"
            case supportedDPUSizes = "SupportedDPUSizes"
        }
    }

    public struct AthenaError: AWSDecodableShape {
        /// An integer value that specifies the category of a query failure error. The following list shows the category for each integer value.  1 - System  2 - User  3 - Other
        public let errorCategory: Int?
        /// Contains a short description of the error that occurred.
        public let errorMessage: String?
        /// An integer value that provides specific information about an Athena query error. For the meaning of specific values, see the Error Type Reference in the Amazon Athena User Guide.
        public let errorType: Int?
        /// True if the query might succeed if resubmitted.
        public let retryable: Bool?

        @inlinable
        public init(errorCategory: Int? = nil, errorMessage: String? = nil, errorType: Int? = nil, retryable: Bool? = nil) {
            self.errorCategory = errorCategory
            self.errorMessage = errorMessage
            self.errorType = errorType
            self.retryable = retryable
        }

        private enum CodingKeys: String, CodingKey {
            case errorCategory = "ErrorCategory"
            case errorMessage = "ErrorMessage"
            case errorType = "ErrorType"
            case retryable = "Retryable"
        }
    }

    public struct BatchGetNamedQueryInput: AWSEncodableShape {
        /// An array of query IDs.
        public let namedQueryIds: [String]

        @inlinable
        public init(namedQueryIds: [String]) {
            self.namedQueryIds = namedQueryIds
        }

        public func validate(name: String) throws {
            try self.namedQueryIds.forEach {
                try validate($0, name: "namedQueryIds[]", parent: name, max: 128)
                try validate($0, name: "namedQueryIds[]", parent: name, min: 1)
                try validate($0, name: "namedQueryIds[]", parent: name, pattern: "^\\S+$")
            }
            try self.validate(self.namedQueryIds, name: "namedQueryIds", parent: name, max: 50)
            try self.validate(self.namedQueryIds, name: "namedQueryIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case namedQueryIds = "NamedQueryIds"
        }
    }

    public struct BatchGetNamedQueryOutput: AWSDecodableShape {
        /// Information about the named query IDs submitted.
        public let namedQueries: [NamedQuery]?
        /// Information about provided query IDs.
        public let unprocessedNamedQueryIds: [UnprocessedNamedQueryId]?

        @inlinable
        public init(namedQueries: [NamedQuery]? = nil, unprocessedNamedQueryIds: [UnprocessedNamedQueryId]? = nil) {
            self.namedQueries = namedQueries
            self.unprocessedNamedQueryIds = unprocessedNamedQueryIds
        }

        private enum CodingKeys: String, CodingKey {
            case namedQueries = "NamedQueries"
            case unprocessedNamedQueryIds = "UnprocessedNamedQueryIds"
        }
    }

    public struct BatchGetPreparedStatementInput: AWSEncodableShape {
        /// A list of prepared statement names to return.
        public let preparedStatementNames: [String]
        /// The name of the workgroup to which the prepared statements belong.
        public let workGroup: String

        @inlinable
        public init(preparedStatementNames: [String], workGroup: String) {
            self.preparedStatementNames = preparedStatementNames
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.preparedStatementNames.forEach {
                try validate($0, name: "preparedStatementNames[]", parent: name, max: 256)
                try validate($0, name: "preparedStatementNames[]", parent: name, min: 1)
                try validate($0, name: "preparedStatementNames[]", parent: name, pattern: "^[a-zA-Z_][a-zA-Z0-9_@:]{1,256}$")
            }
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case preparedStatementNames = "PreparedStatementNames"
            case workGroup = "WorkGroup"
        }
    }

    public struct BatchGetPreparedStatementOutput: AWSDecodableShape {
        /// The list of prepared statements returned.
        public let preparedStatements: [PreparedStatement]?
        /// A list of one or more prepared statements that were requested but could not be returned.
        public let unprocessedPreparedStatementNames: [UnprocessedPreparedStatementName]?

        @inlinable
        public init(preparedStatements: [PreparedStatement]? = nil, unprocessedPreparedStatementNames: [UnprocessedPreparedStatementName]? = nil) {
            self.preparedStatements = preparedStatements
            self.unprocessedPreparedStatementNames = unprocessedPreparedStatementNames
        }

        private enum CodingKeys: String, CodingKey {
            case preparedStatements = "PreparedStatements"
            case unprocessedPreparedStatementNames = "UnprocessedPreparedStatementNames"
        }
    }

    public struct BatchGetQueryExecutionInput: AWSEncodableShape {
        /// An array of query execution IDs.
        public let queryExecutionIds: [String]

        @inlinable
        public init(queryExecutionIds: [String]) {
            self.queryExecutionIds = queryExecutionIds
        }

        public func validate(name: String) throws {
            try self.queryExecutionIds.forEach {
                try validate($0, name: "queryExecutionIds[]", parent: name, max: 128)
                try validate($0, name: "queryExecutionIds[]", parent: name, min: 1)
                try validate($0, name: "queryExecutionIds[]", parent: name, pattern: "^\\S+$")
            }
            try self.validate(self.queryExecutionIds, name: "queryExecutionIds", parent: name, max: 50)
            try self.validate(self.queryExecutionIds, name: "queryExecutionIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queryExecutionIds = "QueryExecutionIds"
        }
    }

    public struct BatchGetQueryExecutionOutput: AWSDecodableShape {
        /// Information about a query execution.
        public let queryExecutions: [QueryExecution]?
        /// Information about the query executions that failed to run.
        public let unprocessedQueryExecutionIds: [UnprocessedQueryExecutionId]?

        @inlinable
        public init(queryExecutions: [QueryExecution]? = nil, unprocessedQueryExecutionIds: [UnprocessedQueryExecutionId]? = nil) {
            self.queryExecutions = queryExecutions
            self.unprocessedQueryExecutionIds = unprocessedQueryExecutionIds
        }

        private enum CodingKeys: String, CodingKey {
            case queryExecutions = "QueryExecutions"
            case unprocessedQueryExecutionIds = "UnprocessedQueryExecutionIds"
        }
    }

    public struct CalculationConfiguration: AWSEncodableShape {
        /// A string that contains the code for the calculation.
        public let codeBlock: String?

        @inlinable
        public init(codeBlock: String? = nil) {
            self.codeBlock = codeBlock
        }

        public func validate(name: String) throws {
            try self.validate(self.codeBlock, name: "codeBlock", parent: name, max: 68000)
        }

        private enum CodingKeys: String, CodingKey {
            case codeBlock = "CodeBlock"
        }
    }

    public struct CalculationResult: AWSDecodableShape {
        /// The Amazon S3 location of the folder for the calculation results.
        public let resultS3Uri: String?
        /// The data format of the calculation result.
        public let resultType: String?
        /// The Amazon S3 location of the stderr error messages file for the calculation.
        public let stdErrorS3Uri: String?
        /// The Amazon S3 location of the stdout file for the calculation.
        public let stdOutS3Uri: String?

        @inlinable
        public init(resultS3Uri: String? = nil, resultType: String? = nil, stdErrorS3Uri: String? = nil, stdOutS3Uri: String? = nil) {
            self.resultS3Uri = resultS3Uri
            self.resultType = resultType
            self.stdErrorS3Uri = stdErrorS3Uri
            self.stdOutS3Uri = stdOutS3Uri
        }

        private enum CodingKeys: String, CodingKey {
            case resultS3Uri = "ResultS3Uri"
            case resultType = "ResultType"
            case stdErrorS3Uri = "StdErrorS3Uri"
            case stdOutS3Uri = "StdOutS3Uri"
        }
    }

    public struct CalculationStatistics: AWSDecodableShape {
        /// The data processing unit execution time in milliseconds for the calculation.
        public let dpuExecutionInMillis: Int64?
        /// The progress of the calculation.
        public let progress: String?

        @inlinable
        public init(dpuExecutionInMillis: Int64? = nil, progress: String? = nil) {
            self.dpuExecutionInMillis = dpuExecutionInMillis
            self.progress = progress
        }

        private enum CodingKeys: String, CodingKey {
            case dpuExecutionInMillis = "DpuExecutionInMillis"
            case progress = "Progress"
        }
    }

    public struct CalculationStatus: AWSDecodableShape {
        /// The date and time the calculation completed processing.
        public let completionDateTime: Date?
        /// The state of the calculation execution. A description of each state follows.  CREATING - The calculation is in the process of being created.  CREATED - The calculation has been created and is ready to run.  QUEUED - The calculation has been queued for processing.  RUNNING - The calculation is running.  CANCELING - A request to cancel the calculation has been received and the system is working to stop it.  CANCELED - The calculation is no longer running as the result of a cancel request.  COMPLETED - The calculation has completed without error.  FAILED - The calculation failed and is no longer running.
        public let state: CalculationExecutionState?
        /// The reason for the calculation state change (for example, the calculation was canceled because the session was terminated).
        public let stateChangeReason: String?
        /// The date and time the calculation was submitted for processing.
        public let submissionDateTime: Date?

        @inlinable
        public init(completionDateTime: Date? = nil, state: CalculationExecutionState? = nil, stateChangeReason: String? = nil, submissionDateTime: Date? = nil) {
            self.completionDateTime = completionDateTime
            self.state = state
            self.stateChangeReason = stateChangeReason
            self.submissionDateTime = submissionDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case completionDateTime = "CompletionDateTime"
            case state = "State"
            case stateChangeReason = "StateChangeReason"
            case submissionDateTime = "SubmissionDateTime"
        }
    }

    public struct CalculationSummary: AWSDecodableShape {
        /// The calculation execution UUID.
        public let calculationExecutionId: String?
        /// A description of the calculation.
        public let description: String?
        /// Contains information about the status of the calculation.
        public let status: CalculationStatus?

        @inlinable
        public init(calculationExecutionId: String? = nil, description: String? = nil, status: CalculationStatus? = nil) {
            self.calculationExecutionId = calculationExecutionId
            self.description = description
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case calculationExecutionId = "CalculationExecutionId"
            case description = "Description"
            case status = "Status"
        }
    }

    public struct CancelCapacityReservationInput: AWSEncodableShape {
        /// The name of the capacity reservation to cancel.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct CancelCapacityReservationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct CapacityAllocation: AWSDecodableShape {
        /// The time when the capacity allocation request was completed.
        public let requestCompletionTime: Date?
        /// The time when the capacity allocation was requested.
        public let requestTime: Date
        /// The status of the capacity allocation.
        public let status: CapacityAllocationStatus
        /// The status message of the capacity allocation.
        public let statusMessage: String?

        @inlinable
        public init(requestCompletionTime: Date? = nil, requestTime: Date, status: CapacityAllocationStatus, statusMessage: String? = nil) {
            self.requestCompletionTime = requestCompletionTime
            self.requestTime = requestTime
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case requestCompletionTime = "RequestCompletionTime"
            case requestTime = "RequestTime"
            case status = "Status"
            case statusMessage = "StatusMessage"
        }
    }

    public struct CapacityAssignment: AWSEncodableShape & AWSDecodableShape {
        /// The list of workgroup names for the capacity assignment.
        public let workGroupNames: [String]?

        @inlinable
        public init(workGroupNames: [String]? = nil) {
            self.workGroupNames = workGroupNames
        }

        public func validate(name: String) throws {
            try self.workGroupNames?.forEach {
                try validate($0, name: "workGroupNames[]", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case workGroupNames = "WorkGroupNames"
        }
    }

    public struct CapacityAssignmentConfiguration: AWSDecodableShape {
        /// The list of assignments that make up the capacity assignment configuration.
        public let capacityAssignments: [CapacityAssignment]?
        /// The name of the reservation that the capacity assignment configuration is for.
        public let capacityReservationName: String?

        @inlinable
        public init(capacityAssignments: [CapacityAssignment]? = nil, capacityReservationName: String? = nil) {
            self.capacityAssignments = capacityAssignments
            self.capacityReservationName = capacityReservationName
        }

        private enum CodingKeys: String, CodingKey {
            case capacityAssignments = "CapacityAssignments"
            case capacityReservationName = "CapacityReservationName"
        }
    }

    public struct CapacityReservation: AWSDecodableShape {
        /// The number of data processing units currently allocated.
        public let allocatedDpus: Int
        /// The time in UTC epoch millis when the capacity reservation was created.
        public let creationTime: Date
        public let lastAllocation: CapacityAllocation?
        /// The time of the most recent capacity allocation that succeeded.
        public let lastSuccessfulAllocationTime: Date?
        /// The name of the capacity reservation.
        public let name: String
        /// The status of the capacity reservation.
        public let status: CapacityReservationStatus
        /// The number of data processing units requested.
        public let targetDpus: Int

        @inlinable
        public init(allocatedDpus: Int, creationTime: Date, lastAllocation: CapacityAllocation? = nil, lastSuccessfulAllocationTime: Date? = nil, name: String, status: CapacityReservationStatus, targetDpus: Int) {
            self.allocatedDpus = allocatedDpus
            self.creationTime = creationTime
            self.lastAllocation = lastAllocation
            self.lastSuccessfulAllocationTime = lastSuccessfulAllocationTime
            self.name = name
            self.status = status
            self.targetDpus = targetDpus
        }

        private enum CodingKeys: String, CodingKey {
            case allocatedDpus = "AllocatedDpus"
            case creationTime = "CreationTime"
            case lastAllocation = "LastAllocation"
            case lastSuccessfulAllocationTime = "LastSuccessfulAllocationTime"
            case name = "Name"
            case status = "Status"
            case targetDpus = "TargetDpus"
        }
    }

    public struct Column: AWSDecodableShape {
        /// Optional information about the column.
        public let comment: String?
        /// The name of the column.
        public let name: String
        /// The data type of the column.
        public let type: String?

        @inlinable
        public init(comment: String? = nil, name: String, type: String? = nil) {
            self.comment = comment
            self.name = name
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case comment = "Comment"
            case name = "Name"
            case type = "Type"
        }
    }

    public struct ColumnInfo: AWSDecodableShape {
        /// Indicates whether values in the column are case-sensitive.
        public let caseSensitive: Bool?
        /// The catalog to which the query results belong.
        public let catalogName: String?
        /// A column label.
        public let label: String?
        /// The name of the column.
        public let name: String
        /// Unsupported constraint. This value always shows as UNKNOWN.
        public let nullable: ColumnNullable?
        /// For DECIMAL data types, specifies the total number of digits, up to 38. For performance reasons, we recommend up to 18 digits.
        public let precision: Int?
        /// For DECIMAL data types, specifies the total number of digits in the fractional part of the value. Defaults to 0.
        public let scale: Int?
        /// The schema name (database name) to which the query results belong.
        public let schemaName: String?
        /// The table name for the query results.
        public let tableName: String?
        /// The data type of the column.
        public let type: String

        @inlinable
        public init(caseSensitive: Bool? = nil, catalogName: String? = nil, label: String? = nil, name: String, nullable: ColumnNullable? = nil, precision: Int? = nil, scale: Int? = nil, schemaName: String? = nil, tableName: String? = nil, type: String) {
            self.caseSensitive = caseSensitive
            self.catalogName = catalogName
            self.label = label
            self.name = name
            self.nullable = nullable
            self.precision = precision
            self.scale = scale
            self.schemaName = schemaName
            self.tableName = tableName
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case caseSensitive = "CaseSensitive"
            case catalogName = "CatalogName"
            case label = "Label"
            case name = "Name"
            case nullable = "Nullable"
            case precision = "Precision"
            case scale = "Scale"
            case schemaName = "SchemaName"
            case tableName = "TableName"
            case type = "Type"
        }
    }

    public struct CreateCapacityReservationInput: AWSEncodableShape {
        /// The name of the capacity reservation to create.
        public let name: String
        /// The tags for the capacity reservation.
        public let tags: [Tag]?
        /// The number of requested data processing units.
        public let targetDpus: Int

        @inlinable
        public init(name: String, tags: [Tag]? = nil, targetDpus: Int) {
            self.name = name
            self.tags = tags
            self.targetDpus = targetDpus
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.targetDpus, name: "targetDpus", parent: name, min: 24)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case tags = "Tags"
            case targetDpus = "TargetDpus"
        }
    }

    public struct CreateCapacityReservationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct CreateDataCatalogInput: AWSEncodableShape {
        /// A description of the data catalog to be created.
        public let description: String?
        /// The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena. For FEDERATED type the catalog name has following considerations and limits:   The catalog name allows special characters such as _ , @ , \ , - . These characters are replaced with a hyphen (-) when creating the CFN Stack Name and with an underscore (_) when creating the Lambda Function and Glue Connection Name.   The catalog name has a theoretical limit of 128 characters. However, since we use it to create other resources that allow less characters and we prepend a prefix to it, the actual catalog name limit for FEDERATED catalog is 64 - 23 = 41 characters.
        public let name: String
        /// Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type.    For the HIVE data catalog type, use the following syntax. The metadata-function parameter is required. The sdk-version parameter is optional and defaults to the currently supported version.  metadata-function=lambda_arn, sdk-version=version_number     For the LAMBDA data catalog type, use one of the following sets of required parameters, but not both.   If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.  metadata-function=lambda_arn, record-function=lambda_arn     If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.  function=lambda_arn       The GLUE type takes a catalog ID parameter and is required. The  catalog_id is the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs.  catalog-id=catalog_id     The GLUE data catalog type also applies to the default AwsDataCatalog that already exists in your account, of which you can have only one and cannot modify.     The FEDERATED data catalog type uses one of the following parameters, but not both. Use connection-arn for an existing Glue connection. Use connection-type and connection-properties to specify the configuration setting for a new connection.    connection-arn:      lambda-role-arn (optional): The execution role to use for the Lambda function. If not provided, one is created.    connection-type:MYSQL|REDSHIFT|...., connection-properties:""  For   , use escaped JSON text, as in the following example.  "{\"spill_bucket\":\"my_spill\",\"spill_prefix\":\"athena-spill\",\"host\":\"abc12345.snowflakecomputing.com\",\"port\":\"1234\",\"warehouse\":\"DEV_WH\",\"database\":\"TEST\",\"schema\":\"PUBLIC\",\"SecretArn\":\"arn:aws:secretsmanager:ap-south-1:111122223333:secret:snowflake-XHb67j\"}"
        public let parameters: [String: String]?
        /// A list of comma separated tags to add to the data catalog that is created. All the resources that are created by the CreateDataCatalog API operation with FEDERATED type will have the tag federated_athena_datacatalog="true". This includes the CFN Stack, Glue Connection, Athena DataCatalog, and all the resources created as part of the CFN Stack (Lambda Function, IAM policies/roles).
        public let tags: [Tag]?
        /// The type of data catalog to create: LAMBDA for a federated catalog, GLUE for an Glue Data Catalog, and HIVE for an external Apache Hive metastore. FEDERATED is a federated catalog for which Athena creates the connection and the Lambda function for you based on the parameters that you pass. For FEDERATED type, we do not support IAM identity center.
        public let type: DataCatalogType

        @inlinable
        public init(description: String? = nil, name: String, parameters: [String: String]? = nil, tags: [Tag]? = nil, type: DataCatalogType) {
            self.description = description
            self.name = name
            self.parameters = parameters
            self.tags = tags
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.parameters?.forEach {
                try validate($0.key, name: "parameters.key", parent: name, max: 255)
                try validate($0.key, name: "parameters.key", parent: name, min: 1)
                try validate($0.key, name: "parameters.key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
                try validate($0.value, name: "parameters[\"\($0.key)\"]", parent: name, max: 51200)
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case parameters = "Parameters"
            case tags = "Tags"
            case type = "Type"
        }
    }

    public struct CreateDataCatalogOutput: AWSDecodableShape {
        public let dataCatalog: DataCatalog?

        @inlinable
        public init(dataCatalog: DataCatalog? = nil) {
            self.dataCatalog = dataCatalog
        }

        private enum CodingKeys: String, CodingKey {
            case dataCatalog = "DataCatalog"
        }
    }

    public struct CreateNamedQueryInput: AWSEncodableShape {
        /// A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another CreateNamedQuery request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned.  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// The database to which the query belongs.
        public let database: String
        /// The query description.
        public let description: String?
        /// The query name.
        public let name: String
        /// The contents of the query with all query statements.
        public let queryString: String
        /// The name of the workgroup in which the named query is being created.
        public let workGroup: String?

        @inlinable
        public init(clientRequestToken: String? = CreateNamedQueryInput.idempotencyToken(), database: String, description: String? = nil, name: String, queryString: String, workGroup: String? = nil) {
            self.clientRequestToken = clientRequestToken
            self.database = database
            self.description = description
            self.name = name
            self.queryString = queryString
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 128)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 32)
            try self.validate(self.database, name: "database", parent: name, max: 255)
            try self.validate(self.database, name: "database", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.queryString, name: "queryString", parent: name, max: 262144)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case database = "Database"
            case description = "Description"
            case name = "Name"
            case queryString = "QueryString"
            case workGroup = "WorkGroup"
        }
    }

    public struct CreateNamedQueryOutput: AWSDecodableShape {
        /// The unique ID of the query.
        public let namedQueryId: String?

        @inlinable
        public init(namedQueryId: String? = nil) {
            self.namedQueryId = namedQueryId
        }

        private enum CodingKeys: String, CodingKey {
            case namedQueryId = "NamedQueryId"
        }
    }

    public struct CreateNotebookInput: AWSEncodableShape {
        /// A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// The name of the ipynb file to be created in the Spark workgroup, without the .ipynb extension.
        public let name: String
        /// The name of the Spark enabled workgroup in which the notebook will be created.
        public let workGroup: String

        @inlinable
        public init(clientRequestToken: String? = nil, name: String, workGroup: String) {
            self.clientRequestToken = clientRequestToken
            self.name = name
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 36)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!.*[/:\\\\])[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]+$")
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case name = "Name"
            case workGroup = "WorkGroup"
        }
    }

    public struct CreateNotebookOutput: AWSDecodableShape {
        /// A unique identifier for the notebook.
        public let notebookId: String?

        @inlinable
        public init(notebookId: String? = nil) {
            self.notebookId = notebookId
        }

        private enum CodingKeys: String, CodingKey {
            case notebookId = "NotebookId"
        }
    }

    public struct CreatePreparedStatementInput: AWSEncodableShape {
        /// The description of the prepared statement.
        public let description: String?
        /// The query string for the prepared statement.
        public let queryStatement: String
        /// The name of the prepared statement.
        public let statementName: String
        /// The name of the workgroup to which the prepared statement belongs.
        public let workGroup: String

        @inlinable
        public init(description: String? = nil, queryStatement: String, statementName: String, workGroup: String) {
            self.description = description
            self.queryStatement = queryStatement
            self.statementName = statementName
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.queryStatement, name: "queryStatement", parent: name, max: 262144)
            try self.validate(self.queryStatement, name: "queryStatement", parent: name, min: 1)
            try self.validate(self.statementName, name: "statementName", parent: name, max: 256)
            try self.validate(self.statementName, name: "statementName", parent: name, min: 1)
            try self.validate(self.statementName, name: "statementName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z0-9_@:]{1,256}$")
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case queryStatement = "QueryStatement"
            case statementName = "StatementName"
            case workGroup = "WorkGroup"
        }
    }

    public struct CreatePreparedStatementOutput: AWSDecodableShape {
        public init() {}
    }

    public struct CreatePresignedNotebookUrlRequest: AWSEncodableShape {
        /// The session ID.
        public let sessionId: String

        @inlinable
        public init(sessionId: String) {
            self.sessionId = sessionId
        }

        public func validate(name: String) throws {
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case sessionId = "SessionId"
        }
    }

    public struct CreatePresignedNotebookUrlResponse: AWSDecodableShape {
        /// The authentication token for the notebook.
        public let authToken: String
        /// The UTC epoch time when the authentication token expires.
        public let authTokenExpirationTime: Int64
        /// The URL of the notebook. The URL includes the authentication token and notebook file name and points directly to the opened notebook.
        public let notebookUrl: String

        @inlinable
        public init(authToken: String, authTokenExpirationTime: Int64, notebookUrl: String) {
            self.authToken = authToken
            self.authTokenExpirationTime = authTokenExpirationTime
            self.notebookUrl = notebookUrl
        }

        private enum CodingKeys: String, CodingKey {
            case authToken = "AuthToken"
            case authTokenExpirationTime = "AuthTokenExpirationTime"
            case notebookUrl = "NotebookUrl"
        }
    }

    public struct CreateWorkGroupInput: AWSEncodableShape {
        /// Contains configuration information for creating an Athena SQL workgroup or Spark enabled Athena workgroup. Athena SQL workgroup configuration includes the location in Amazon S3 where query and calculation results are stored, the encryption configuration, if any, used for encrypting query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, the limit for the amount of bytes scanned (cutoff) per query, if it is specified, and whether workgroup's settings (specified with EnforceWorkGroupConfiguration) in the WorkGroupConfiguration override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
        public let configuration: WorkGroupConfiguration?
        /// The workgroup description.
        public let description: String?
        /// The workgroup name.
        public let name: String
        /// A list of comma separated tags to add to the workgroup that is created.
        public let tags: [Tag]?

        @inlinable
        public init(configuration: WorkGroupConfiguration? = nil, description: String? = nil, name: String, tags: [Tag]? = nil) {
            self.configuration = configuration
            self.description = description
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.configuration?.validate(name: "\(name).configuration")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case description = "Description"
            case name = "Name"
            case tags = "Tags"
        }
    }

    public struct CreateWorkGroupOutput: AWSDecodableShape {
        public init() {}
    }

    public struct CustomerContentEncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The customer managed KMS key that is used to encrypt the user's data stores in Athena.
        public let kmsKey: String

        @inlinable
        public init(kmsKey: String) {
            self.kmsKey = kmsKey
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, max: 2048)
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, min: 1)
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, pattern: "^arn:aws[a-z\\-]*:kms:([a-z0-9\\-]+):\\d{12}:key/?[a-zA-Z_0-9+=,.@\\-_/]+$|^arn:aws[a-z\\-]*:kms:([a-z0-9\\-]+):\\d{12}:alias/?[a-zA-Z_0-9+=,.@\\-_/]+$|^alias/[a-zA-Z0-9/_-]+$|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKey = "KmsKey"
        }
    }

    public struct DataCatalog: AWSDecodableShape {
        /// The type of connection for a FEDERATED data catalog (for example, REDSHIFT, MYSQL, or SQLSERVER). For information about individual connectors, see Available data source connectors.
        public let connectionType: ConnectionType?
        /// An optional description of the data catalog.
        public let description: String?
        /// Text of the error that occurred during data catalog creation or deletion.
        public let error: String?
        /// The name of the data catalog. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.
        public let name: String
        /// Specifies the Lambda function or functions to use for the data catalog. This is a mapping whose values depend on the catalog type.    For the HIVE data catalog type, use the following syntax. The metadata-function parameter is required. The sdk-version parameter is optional and defaults to the currently supported version.  metadata-function=lambda_arn, sdk-version=version_number     For the LAMBDA data catalog type, use one of the following sets of required parameters, but not both.   If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.  metadata-function=lambda_arn, record-function=lambda_arn     If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.  function=lambda_arn       The GLUE type takes a catalog ID parameter and is required. The  catalog_id is the account ID of the Amazon Web Services account to which the Glue catalog belongs.  catalog-id=catalog_id     The GLUE data catalog type also applies to the default AwsDataCatalog that already exists in your account, of which you can have only one and cannot modify.     The FEDERATED data catalog type uses one of the following parameters, but not both. Use connection-arn for an existing Glue connection. Use connection-type and connection-properties to specify the configuration setting for a new connection.    connection-arn:      connection-type:MYSQL|REDSHIFT|...., connection-properties:""  For   , use escaped JSON text, as in the following example.  "{\"spill_bucket\":\"my_spill\",\"spill_prefix\":\"athena-spill\",\"host\":\"abc12345.snowflakecomputing.com\",\"port\":\"1234\",\"warehouse\":\"DEV_WH\",\"database\":\"TEST\",\"schema\":\"PUBLIC\",\"SecretArn\":\"arn:aws:secretsmanager:ap-south-1:111122223333:secret:snowflake-XHb67j\"}"
        public let parameters: [String: String]?
        /// The status of the creation or deletion of the data catalog.   The LAMBDA, GLUE, and HIVE data catalog types are created synchronously. Their status is either CREATE_COMPLETE or CREATE_FAILED.   The FEDERATED data catalog type is created asynchronously.   Data catalog creation status:    CREATE_IN_PROGRESS: Federated data catalog creation in progress.    CREATE_COMPLETE: Data catalog creation complete.    CREATE_FAILED: Data catalog could not be created.    CREATE_FAILED_CLEANUP_IN_PROGRESS: Federated data catalog creation failed and is being removed.    CREATE_FAILED_CLEANUP_COMPLETE: Federated data catalog creation failed and was removed.    CREATE_FAILED_CLEANUP_FAILED: Federated data catalog creation failed but could not be removed.   Data catalog deletion status:    DELETE_IN_PROGRESS: Federated data catalog deletion in progress.    DELETE_COMPLETE: Federated data catalog deleted.    DELETE_FAILED: Federated data catalog could not be deleted.
        public let status: DataCatalogStatus?
        /// The type of data catalog to create: LAMBDA for a federated catalog, GLUE for an Glue Data Catalog, and HIVE for an external Apache Hive metastore. FEDERATED is a federated catalog for which Athena creates the connection and the Lambda function for you based on the parameters that you pass.
        public let type: DataCatalogType

        @inlinable
        public init(connectionType: ConnectionType? = nil, description: String? = nil, error: String? = nil, name: String, parameters: [String: String]? = nil, status: DataCatalogStatus? = nil, type: DataCatalogType) {
            self.connectionType = connectionType
            self.description = description
            self.error = error
            self.name = name
            self.parameters = parameters
            self.status = status
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case connectionType = "ConnectionType"
            case description = "Description"
            case error = "Error"
            case name = "Name"
            case parameters = "Parameters"
            case status = "Status"
            case type = "Type"
        }
    }

    public struct DataCatalogSummary: AWSDecodableShape {
        /// The name of the data catalog. The catalog name is unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.
        public let catalogName: String?
        /// The type of connection for a FEDERATED data catalog (for example, REDSHIFT, MYSQL, or SQLSERVER). For information about individual connectors, see Available data source connectors.
        public let connectionType: ConnectionType?
        /// Text of the error that occurred during data catalog creation or deletion.
        public let error: String?
        /// The status of the creation or deletion of the data catalog.   The LAMBDA, GLUE, and HIVE data catalog types are created synchronously. Their status is either CREATE_COMPLETE or CREATE_FAILED.   The FEDERATED data catalog type is created asynchronously.   Data catalog creation status:    CREATE_IN_PROGRESS: Federated data catalog creation in progress.    CREATE_COMPLETE: Data catalog creation complete.    CREATE_FAILED: Data catalog could not be created.    CREATE_FAILED_CLEANUP_IN_PROGRESS: Federated data catalog creation failed and is being removed.    CREATE_FAILED_CLEANUP_COMPLETE: Federated data catalog creation failed and was removed.    CREATE_FAILED_CLEANUP_FAILED: Federated data catalog creation failed but could not be removed.   Data catalog deletion status:    DELETE_IN_PROGRESS: Federated data catalog deletion in progress.    DELETE_COMPLETE: Federated data catalog deleted.    DELETE_FAILED: Federated data catalog could not be deleted.
        public let status: DataCatalogStatus?
        /// The data catalog type.
        public let type: DataCatalogType?

        @inlinable
        public init(catalogName: String? = nil, connectionType: ConnectionType? = nil, error: String? = nil, status: DataCatalogStatus? = nil, type: DataCatalogType? = nil) {
            self.catalogName = catalogName
            self.connectionType = connectionType
            self.error = error
            self.status = status
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case catalogName = "CatalogName"
            case connectionType = "ConnectionType"
            case error = "Error"
            case status = "Status"
            case type = "Type"
        }
    }

    public struct Database: AWSDecodableShape {
        /// An optional description of the database.
        public let description: String?
        /// The name of the database.
        public let name: String
        /// A set of custom key/value pairs.
        public let parameters: [String: String]?

        @inlinable
        public init(description: String? = nil, name: String, parameters: [String: String]? = nil) {
            self.description = description
            self.name = name
            self.parameters = parameters
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case parameters = "Parameters"
        }
    }

    public struct Datum: AWSDecodableShape {
        /// The value of the datum.
        public let varCharValue: String?

        @inlinable
        public init(varCharValue: String? = nil) {
            self.varCharValue = varCharValue
        }

        private enum CodingKeys: String, CodingKey {
            case varCharValue = "VarCharValue"
        }
    }

    public struct DeleteCapacityReservationInput: AWSEncodableShape {
        /// The name of the capacity reservation to delete.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteCapacityReservationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDataCatalogInput: AWSEncodableShape {
        /// Deletes the Athena Data Catalog. You can only use this with the FEDERATED catalogs. You usually perform this before registering the connector with Glue Data Catalog. After deletion, you will have to manage the Glue Connection and Lambda function.
        public let deleteCatalogOnly: Bool?
        /// The name of the data catalog to delete.
        public let name: String

        @inlinable
        public init(deleteCatalogOnly: Bool? = nil, name: String) {
            self.deleteCatalogOnly = deleteCatalogOnly
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case deleteCatalogOnly = "DeleteCatalogOnly"
            case name = "Name"
        }
    }

    public struct DeleteDataCatalogOutput: AWSDecodableShape {
        public let dataCatalog: DataCatalog?

        @inlinable
        public init(dataCatalog: DataCatalog? = nil) {
            self.dataCatalog = dataCatalog
        }

        private enum CodingKeys: String, CodingKey {
            case dataCatalog = "DataCatalog"
        }
    }

    public struct DeleteNamedQueryInput: AWSEncodableShape {
        /// The unique ID of the query to delete.
        public let namedQueryId: String

        @inlinable
        public init(namedQueryId: String = DeleteNamedQueryInput.idempotencyToken()) {
            self.namedQueryId = namedQueryId
        }

        public func validate(name: String) throws {
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, max: 128)
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, min: 1)
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case namedQueryId = "NamedQueryId"
        }
    }

    public struct DeleteNamedQueryOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteNotebookInput: AWSEncodableShape {
        /// The ID of the notebook to delete.
        public let notebookId: String

        @inlinable
        public init(notebookId: String) {
            self.notebookId = notebookId
        }

        public func validate(name: String) throws {
            try self.validate(self.notebookId, name: "notebookId", parent: name, max: 36)
            try self.validate(self.notebookId, name: "notebookId", parent: name, min: 1)
            try self.validate(self.notebookId, name: "notebookId", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case notebookId = "NotebookId"
        }
    }

    public struct DeleteNotebookOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePreparedStatementInput: AWSEncodableShape {
        /// The name of the prepared statement to delete.
        public let statementName: String
        /// The workgroup to which the statement to be deleted belongs.
        public let workGroup: String

        @inlinable
        public init(statementName: String, workGroup: String) {
            self.statementName = statementName
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.statementName, name: "statementName", parent: name, max: 256)
            try self.validate(self.statementName, name: "statementName", parent: name, min: 1)
            try self.validate(self.statementName, name: "statementName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z0-9_@:]{1,256}$")
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case statementName = "StatementName"
            case workGroup = "WorkGroup"
        }
    }

    public struct DeletePreparedStatementOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteWorkGroupInput: AWSEncodableShape {
        /// The option to delete the workgroup and its contents even if the workgroup contains any named queries, query executions, or notebooks.
        public let recursiveDeleteOption: Bool?
        /// The unique name of the workgroup to delete.
        public let workGroup: String

        @inlinable
        public init(recursiveDeleteOption: Bool? = nil, workGroup: String) {
            self.recursiveDeleteOption = recursiveDeleteOption
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case recursiveDeleteOption = "RecursiveDeleteOption"
            case workGroup = "WorkGroup"
        }
    }

    public struct DeleteWorkGroupOutput: AWSDecodableShape {
        public init() {}
    }

    public struct EncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE_S3), server-side encryption with KMS-managed keys (SSE_KMS), or client-side encryption with KMS-managed keys (CSE_KMS) is used. If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
        public let encryptionOption: EncryptionOption
        /// For SSE_KMS and CSE_KMS, this is the KMS key ARN or ID.
        public let kmsKey: String?

        @inlinable
        public init(encryptionOption: EncryptionOption, kmsKey: String? = nil) {
            self.encryptionOption = encryptionOption
            self.kmsKey = kmsKey
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionOption = "EncryptionOption"
            case kmsKey = "KmsKey"
        }
    }

    public struct EngineConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Contains additional notebook engine MAP parameter mappings in the form of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value for the StartSessionRequest$NotebookVersion field, and then add a key named NotebookId to AdditionalConfigs that has the value of the Athena notebook ID.
        public let additionalConfigs: [String: String]?
        /// The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing work and manages other executors in a notebook session. The default is 1.
        public let coordinatorDpuSize: Int?
        /// The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook session can request from Athena. The default is 1.
        public let defaultExecutorDpuSize: Int?
        /// The maximum number of DPUs that can run concurrently.
        public let maxConcurrentDpus: Int
        /// Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general Spark tuning.
        public let sparkProperties: [String: String]?

        @inlinable
        public init(additionalConfigs: [String: String]? = nil, coordinatorDpuSize: Int? = nil, defaultExecutorDpuSize: Int? = nil, maxConcurrentDpus: Int, sparkProperties: [String: String]? = nil) {
            self.additionalConfigs = additionalConfigs
            self.coordinatorDpuSize = coordinatorDpuSize
            self.defaultExecutorDpuSize = defaultExecutorDpuSize
            self.maxConcurrentDpus = maxConcurrentDpus
            self.sparkProperties = sparkProperties
        }

        public func validate(name: String) throws {
            try self.additionalConfigs?.forEach {
                try validate($0.key, name: "additionalConfigs.key", parent: name, max: 255)
                try validate($0.key, name: "additionalConfigs.key", parent: name, min: 1)
                try validate($0.key, name: "additionalConfigs.key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
                try validate($0.value, name: "additionalConfigs[\"\($0.key)\"]", parent: name, max: 51200)
            }
            try self.validate(self.coordinatorDpuSize, name: "coordinatorDpuSize", parent: name, max: 1)
            try self.validate(self.coordinatorDpuSize, name: "coordinatorDpuSize", parent: name, min: 1)
            try self.validate(self.defaultExecutorDpuSize, name: "defaultExecutorDpuSize", parent: name, max: 1)
            try self.validate(self.defaultExecutorDpuSize, name: "defaultExecutorDpuSize", parent: name, min: 1)
            try self.validate(self.maxConcurrentDpus, name: "maxConcurrentDpus", parent: name, max: 5000)
            try self.validate(self.maxConcurrentDpus, name: "maxConcurrentDpus", parent: name, min: 2)
            try self.sparkProperties?.forEach {
                try validate($0.key, name: "sparkProperties.key", parent: name, max: 255)
                try validate($0.key, name: "sparkProperties.key", parent: name, min: 1)
                try validate($0.key, name: "sparkProperties.key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
                try validate($0.value, name: "sparkProperties[\"\($0.key)\"]", parent: name, max: 51200)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case additionalConfigs = "AdditionalConfigs"
            case coordinatorDpuSize = "CoordinatorDpuSize"
            case defaultExecutorDpuSize = "DefaultExecutorDpuSize"
            case maxConcurrentDpus = "MaxConcurrentDpus"
            case sparkProperties = "SparkProperties"
        }
    }

    public struct EngineVersion: AWSEncodableShape & AWSDecodableShape {
        /// Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.
        public let effectiveEngineVersion: String?
        /// The engine version requested by the user. Possible values are determined by the output of ListEngineVersions, including AUTO. The default is AUTO.
        public let selectedEngineVersion: String?

        @inlinable
        public init(effectiveEngineVersion: String? = nil, selectedEngineVersion: String? = nil) {
            self.effectiveEngineVersion = effectiveEngineVersion
            self.selectedEngineVersion = selectedEngineVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.effectiveEngineVersion, name: "effectiveEngineVersion", parent: name, max: 128)
            try self.validate(self.effectiveEngineVersion, name: "effectiveEngineVersion", parent: name, min: 1)
            try self.validate(self.selectedEngineVersion, name: "selectedEngineVersion", parent: name, max: 128)
            try self.validate(self.selectedEngineVersion, name: "selectedEngineVersion", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case effectiveEngineVersion = "EffectiveEngineVersion"
            case selectedEngineVersion = "SelectedEngineVersion"
        }
    }

    public struct ExecutorsSummary: AWSDecodableShape {
        /// The UUID of the executor.
        public let executorId: String
        /// The smallest unit of compute that a session can request from Athena. Size is measured in data processing unit (DPU) values, a relative measure of processing power.
        public let executorSize: Int64?
        /// The processing state of the executor. A description of each state follows.  CREATING - The executor is being started, including acquiring resources.  CREATED - The executor has been started.  REGISTERED - The executor has been registered.  TERMINATING - The executor is in the process of shutting down.  TERMINATED - The executor is no longer running.  FAILED - Due to a failure, the executor is no longer running.
        public let executorState: ExecutorState?
        /// The type of executor used for the application (COORDINATOR, GATEWAY, or WORKER).
        public let executorType: ExecutorType?
        /// The date and time that the executor started.
        public let startDateTime: Int64?
        /// The date and time that the executor was terminated.
        public let terminationDateTime: Int64?

        @inlinable
        public init(executorId: String, executorSize: Int64? = nil, executorState: ExecutorState? = nil, executorType: ExecutorType? = nil, startDateTime: Int64? = nil, terminationDateTime: Int64? = nil) {
            self.executorId = executorId
            self.executorSize = executorSize
            self.executorState = executorState
            self.executorType = executorType
            self.startDateTime = startDateTime
            self.terminationDateTime = terminationDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case executorId = "ExecutorId"
            case executorSize = "ExecutorSize"
            case executorState = "ExecutorState"
            case executorType = "ExecutorType"
            case startDateTime = "StartDateTime"
            case terminationDateTime = "TerminationDateTime"
        }
    }

    public struct ExportNotebookInput: AWSEncodableShape {
        /// The ID of the notebook to export.
        public let notebookId: String

        @inlinable
        public init(notebookId: String) {
            self.notebookId = notebookId
        }

        public func validate(name: String) throws {
            try self.validate(self.notebookId, name: "notebookId", parent: name, max: 36)
            try self.validate(self.notebookId, name: "notebookId", parent: name, min: 1)
            try self.validate(self.notebookId, name: "notebookId", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case notebookId = "NotebookId"
        }
    }

    public struct ExportNotebookOutput: AWSDecodableShape {
        /// The notebook metadata, including notebook ID, notebook name, and workgroup name.
        public let notebookMetadata: NotebookMetadata?
        /// The content of the exported notebook.
        public let payload: String?

        @inlinable
        public init(notebookMetadata: NotebookMetadata? = nil, payload: String? = nil) {
            self.notebookMetadata = notebookMetadata
            self.payload = payload
        }

        private enum CodingKeys: String, CodingKey {
            case notebookMetadata = "NotebookMetadata"
            case payload = "Payload"
        }
    }

    public struct FilterDefinition: AWSEncodableShape {
        /// The name of the notebook to search for.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!.*[/:\\\\])[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct GetCalculationExecutionCodeRequest: AWSEncodableShape {
        /// The calculation execution UUID.
        public let calculationExecutionId: String

        @inlinable
        public init(calculationExecutionId: String) {
            self.calculationExecutionId = calculationExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, max: 36)
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case calculationExecutionId = "CalculationExecutionId"
        }
    }

    public struct GetCalculationExecutionCodeResponse: AWSDecodableShape {
        /// The unencrypted code that was executed for the calculation.
        public let codeBlock: String?

        @inlinable
        public init(codeBlock: String? = nil) {
            self.codeBlock = codeBlock
        }

        private enum CodingKeys: String, CodingKey {
            case codeBlock = "CodeBlock"
        }
    }

    public struct GetCalculationExecutionRequest: AWSEncodableShape {
        /// The calculation execution UUID.
        public let calculationExecutionId: String

        @inlinable
        public init(calculationExecutionId: String) {
            self.calculationExecutionId = calculationExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, max: 36)
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case calculationExecutionId = "CalculationExecutionId"
        }
    }

    public struct GetCalculationExecutionResponse: AWSDecodableShape {
        /// The calculation execution UUID.
        public let calculationExecutionId: String?
        /// The description of the calculation execution.
        public let description: String?
        /// Contains result information. This field is populated only if the calculation is completed.
        public let result: CalculationResult?
        /// The session ID that the calculation ran in.
        public let sessionId: String?
        /// Contains information about the data processing unit (DPU) execution time and progress. This field is populated only when statistics are available.
        public let statistics: CalculationStatistics?
        /// Contains information about the status of the calculation.
        public let status: CalculationStatus?
        /// The Amazon S3 location in which calculation results are stored.
        public let workingDirectory: String?

        @inlinable
        public init(calculationExecutionId: String? = nil, description: String? = nil, result: CalculationResult? = nil, sessionId: String? = nil, statistics: CalculationStatistics? = nil, status: CalculationStatus? = nil, workingDirectory: String? = nil) {
            self.calculationExecutionId = calculationExecutionId
            self.description = description
            self.result = result
            self.sessionId = sessionId
            self.statistics = statistics
            self.status = status
            self.workingDirectory = workingDirectory
        }

        private enum CodingKeys: String, CodingKey {
            case calculationExecutionId = "CalculationExecutionId"
            case description = "Description"
            case result = "Result"
            case sessionId = "SessionId"
            case statistics = "Statistics"
            case status = "Status"
            case workingDirectory = "WorkingDirectory"
        }
    }

    public struct GetCalculationExecutionStatusRequest: AWSEncodableShape {
        /// The calculation execution UUID.
        public let calculationExecutionId: String

        @inlinable
        public init(calculationExecutionId: String) {
            self.calculationExecutionId = calculationExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, max: 36)
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case calculationExecutionId = "CalculationExecutionId"
        }
    }

    public struct GetCalculationExecutionStatusResponse: AWSDecodableShape {
        /// Contains information about the DPU execution time and progress.
        public let statistics: CalculationStatistics?
        /// Contains information about the calculation execution status.
        public let status: CalculationStatus?

        @inlinable
        public init(statistics: CalculationStatistics? = nil, status: CalculationStatus? = nil) {
            self.statistics = statistics
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case statistics = "Statistics"
            case status = "Status"
        }
    }

    public struct GetCapacityAssignmentConfigurationInput: AWSEncodableShape {
        /// The name of the capacity reservation to retrieve the capacity assignment configuration for.
        public let capacityReservationName: String

        @inlinable
        public init(capacityReservationName: String) {
            self.capacityReservationName = capacityReservationName
        }

        public func validate(name: String) throws {
            try self.validate(self.capacityReservationName, name: "capacityReservationName", parent: name, max: 128)
            try self.validate(self.capacityReservationName, name: "capacityReservationName", parent: name, min: 1)
            try self.validate(self.capacityReservationName, name: "capacityReservationName", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case capacityReservationName = "CapacityReservationName"
        }
    }

    public struct GetCapacityAssignmentConfigurationOutput: AWSDecodableShape {
        /// The requested capacity assignment configuration for the specified capacity reservation.
        public let capacityAssignmentConfiguration: CapacityAssignmentConfiguration

        @inlinable
        public init(capacityAssignmentConfiguration: CapacityAssignmentConfiguration) {
            self.capacityAssignmentConfiguration = capacityAssignmentConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case capacityAssignmentConfiguration = "CapacityAssignmentConfiguration"
        }
    }

    public struct GetCapacityReservationInput: AWSEncodableShape {
        /// The name of the capacity reservation.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct GetCapacityReservationOutput: AWSDecodableShape {
        /// The requested capacity reservation structure.
        public let capacityReservation: CapacityReservation

        @inlinable
        public init(capacityReservation: CapacityReservation) {
            self.capacityReservation = capacityReservation
        }

        private enum CodingKeys: String, CodingKey {
            case capacityReservation = "CapacityReservation"
        }
    }

    public struct GetDataCatalogInput: AWSEncodableShape {
        /// The name of the data catalog to return.
        public let name: String
        /// The name of the workgroup. Required if making an IAM Identity Center request.
        public let workGroup: String?

        @inlinable
        public init(name: String, workGroup: String? = nil) {
            self.name = name
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case workGroup = "WorkGroup"
        }
    }

    public struct GetDataCatalogOutput: AWSDecodableShape {
        /// The data catalog returned.
        public let dataCatalog: DataCatalog?

        @inlinable
        public init(dataCatalog: DataCatalog? = nil) {
            self.dataCatalog = dataCatalog
        }

        private enum CodingKeys: String, CodingKey {
            case dataCatalog = "DataCatalog"
        }
    }

    public struct GetDatabaseInput: AWSEncodableShape {
        /// The name of the data catalog that contains the database to return.
        public let catalogName: String
        /// The name of the database to return.
        public let databaseName: String
        /// The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
        public let workGroup: String?

        @inlinable
        public init(catalogName: String, databaseName: String, workGroup: String? = nil) {
            self.catalogName = catalogName
            self.databaseName = databaseName
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogName, name: "catalogName", parent: name, max: 256)
            try self.validate(self.catalogName, name: "catalogName", parent: name, min: 1)
            try self.validate(self.catalogName, name: "catalogName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 128)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogName = "CatalogName"
            case databaseName = "DatabaseName"
            case workGroup = "WorkGroup"
        }
    }

    public struct GetDatabaseOutput: AWSDecodableShape {
        /// The database returned.
        public let database: Database?

        @inlinable
        public init(database: Database? = nil) {
            self.database = database
        }

        private enum CodingKeys: String, CodingKey {
            case database = "Database"
        }
    }

    public struct GetNamedQueryInput: AWSEncodableShape {
        /// The unique ID of the query. Use ListNamedQueries to get query IDs.
        public let namedQueryId: String

        @inlinable
        public init(namedQueryId: String) {
            self.namedQueryId = namedQueryId
        }

        public func validate(name: String) throws {
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, max: 128)
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, min: 1)
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case namedQueryId = "NamedQueryId"
        }
    }

    public struct GetNamedQueryOutput: AWSDecodableShape {
        /// Information about the query.
        public let namedQuery: NamedQuery?

        @inlinable
        public init(namedQuery: NamedQuery? = nil) {
            self.namedQuery = namedQuery
        }

        private enum CodingKeys: String, CodingKey {
            case namedQuery = "NamedQuery"
        }
    }

    public struct GetNotebookMetadataInput: AWSEncodableShape {
        /// The ID of the notebook whose metadata is to be retrieved.
        public let notebookId: String

        @inlinable
        public init(notebookId: String) {
            self.notebookId = notebookId
        }

        public func validate(name: String) throws {
            try self.validate(self.notebookId, name: "notebookId", parent: name, max: 36)
            try self.validate(self.notebookId, name: "notebookId", parent: name, min: 1)
            try self.validate(self.notebookId, name: "notebookId", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case notebookId = "NotebookId"
        }
    }

    public struct GetNotebookMetadataOutput: AWSDecodableShape {
        /// The metadata that is returned for the specified notebook ID.
        public let notebookMetadata: NotebookMetadata?

        @inlinable
        public init(notebookMetadata: NotebookMetadata? = nil) {
            self.notebookMetadata = notebookMetadata
        }

        private enum CodingKeys: String, CodingKey {
            case notebookMetadata = "NotebookMetadata"
        }
    }

    public struct GetPreparedStatementInput: AWSEncodableShape {
        /// The name of the prepared statement to retrieve.
        public let statementName: String
        /// The workgroup to which the statement to be retrieved belongs.
        public let workGroup: String

        @inlinable
        public init(statementName: String, workGroup: String) {
            self.statementName = statementName
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.statementName, name: "statementName", parent: name, max: 256)
            try self.validate(self.statementName, name: "statementName", parent: name, min: 1)
            try self.validate(self.statementName, name: "statementName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z0-9_@:]{1,256}$")
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case statementName = "StatementName"
            case workGroup = "WorkGroup"
        }
    }

    public struct GetPreparedStatementOutput: AWSDecodableShape {
        /// The name of the prepared statement that was retrieved.
        public let preparedStatement: PreparedStatement?

        @inlinable
        public init(preparedStatement: PreparedStatement? = nil) {
            self.preparedStatement = preparedStatement
        }

        private enum CodingKeys: String, CodingKey {
            case preparedStatement = "PreparedStatement"
        }
    }

    public struct GetQueryExecutionInput: AWSEncodableShape {
        /// The unique ID of the query execution.
        public let queryExecutionId: String

        @inlinable
        public init(queryExecutionId: String) {
            self.queryExecutionId = queryExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, max: 128)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, min: 1)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case queryExecutionId = "QueryExecutionId"
        }
    }

    public struct GetQueryExecutionOutput: AWSDecodableShape {
        /// Information about the query execution.
        public let queryExecution: QueryExecution?

        @inlinable
        public init(queryExecution: QueryExecution? = nil) {
            self.queryExecution = queryExecution
        }

        private enum CodingKeys: String, CodingKey {
            case queryExecution = "QueryExecution"
        }
    }

    public struct GetQueryResultsInput: AWSEncodableShape {
        /// The maximum number of results (rows) to return in this request.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The unique ID of the query execution.
        public let queryExecutionId: String
        ///  When you set this to DATA_ROWS or empty, GetQueryResults returns the query results in rows. If set to DATA_MANIFEST, it returns the manifest file in rows. Only the query types CREATE TABLE AS SELECT, UNLOAD, and INSERT can generate a manifest file. If you use DATA_MANIFEST for other query types, the query will fail.
        public let queryResultType: QueryResultType?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, queryExecutionId: String, queryResultType: QueryResultType? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queryExecutionId = queryExecutionId
            self.queryResultType = queryResultType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, max: 128)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, min: 1)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case queryExecutionId = "QueryExecutionId"
            case queryResultType = "QueryResultType"
        }
    }

    public struct GetQueryResultsOutput: AWSDecodableShape {
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The results of the query execution.
        public let resultSet: ResultSet?
        /// The number of rows inserted with a CREATE TABLE AS SELECT, INSERT INTO, or UPDATE statement.
        public let updateCount: Int64?

        @inlinable
        public init(nextToken: String? = nil, resultSet: ResultSet? = nil, updateCount: Int64? = nil) {
            self.nextToken = nextToken
            self.resultSet = resultSet
            self.updateCount = updateCount
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resultSet = "ResultSet"
            case updateCount = "UpdateCount"
        }
    }

    public struct GetQueryRuntimeStatisticsInput: AWSEncodableShape {
        /// The unique ID of the query execution.
        public let queryExecutionId: String

        @inlinable
        public init(queryExecutionId: String) {
            self.queryExecutionId = queryExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, max: 128)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, min: 1)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case queryExecutionId = "QueryExecutionId"
        }
    }

    public struct GetQueryRuntimeStatisticsOutput: AWSDecodableShape {
        /// Runtime statistics about the query execution.
        public let queryRuntimeStatistics: QueryRuntimeStatistics?

        @inlinable
        public init(queryRuntimeStatistics: QueryRuntimeStatistics? = nil) {
            self.queryRuntimeStatistics = queryRuntimeStatistics
        }

        private enum CodingKeys: String, CodingKey {
            case queryRuntimeStatistics = "QueryRuntimeStatistics"
        }
    }

    public struct GetSessionRequest: AWSEncodableShape {
        /// The session ID.
        public let sessionId: String

        @inlinable
        public init(sessionId: String) {
            self.sessionId = sessionId
        }

        public func validate(name: String) throws {
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case sessionId = "SessionId"
        }
    }

    public struct GetSessionResponse: AWSDecodableShape {
        /// The session description.
        public let description: String?
        /// Contains engine configuration information like DPU usage.
        public let engineConfiguration: EngineConfiguration?
        /// The engine version used by the session (for example, PySpark engine version 3). You can get a list of engine versions by calling ListEngineVersions.
        public let engineVersion: String?
        /// The notebook version.
        public let notebookVersion: String?
        /// Contains the workgroup configuration information used by the session.
        public let sessionConfiguration: SessionConfiguration?
        /// The session ID.
        public let sessionId: String?
        /// Contains the DPU execution time.
        public let statistics: SessionStatistics?
        /// Contains information about the status of the session.
        public let status: SessionStatus?
        /// The workgroup to which the session belongs.
        public let workGroup: String?

        @inlinable
        public init(description: String? = nil, engineConfiguration: EngineConfiguration? = nil, engineVersion: String? = nil, notebookVersion: String? = nil, sessionConfiguration: SessionConfiguration? = nil, sessionId: String? = nil, statistics: SessionStatistics? = nil, status: SessionStatus? = nil, workGroup: String? = nil) {
            self.description = description
            self.engineConfiguration = engineConfiguration
            self.engineVersion = engineVersion
            self.notebookVersion = notebookVersion
            self.sessionConfiguration = sessionConfiguration
            self.sessionId = sessionId
            self.statistics = statistics
            self.status = status
            self.workGroup = workGroup
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case engineConfiguration = "EngineConfiguration"
            case engineVersion = "EngineVersion"
            case notebookVersion = "NotebookVersion"
            case sessionConfiguration = "SessionConfiguration"
            case sessionId = "SessionId"
            case statistics = "Statistics"
            case status = "Status"
            case workGroup = "WorkGroup"
        }
    }

    public struct GetSessionStatusRequest: AWSEncodableShape {
        /// The session ID.
        public let sessionId: String

        @inlinable
        public init(sessionId: String) {
            self.sessionId = sessionId
        }

        public func validate(name: String) throws {
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case sessionId = "SessionId"
        }
    }

    public struct GetSessionStatusResponse: AWSDecodableShape {
        /// The session ID.
        public let sessionId: String?
        /// Contains information about the status of the session.
        public let status: SessionStatus?

        @inlinable
        public init(sessionId: String? = nil, status: SessionStatus? = nil) {
            self.sessionId = sessionId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case sessionId = "SessionId"
            case status = "Status"
        }
    }

    public struct GetTableMetadataInput: AWSEncodableShape {
        /// The name of the data catalog that contains the database and table metadata to return.
        public let catalogName: String
        /// The name of the database that contains the table metadata to return.
        public let databaseName: String
        /// The name of the table for which metadata is returned.
        public let tableName: String
        /// The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
        public let workGroup: String?

        @inlinable
        public init(catalogName: String, databaseName: String, tableName: String, workGroup: String? = nil) {
            self.catalogName = catalogName
            self.databaseName = databaseName
            self.tableName = tableName
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogName, name: "catalogName", parent: name, max: 256)
            try self.validate(self.catalogName, name: "catalogName", parent: name, min: 1)
            try self.validate(self.catalogName, name: "catalogName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 128)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, max: 128)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogName = "CatalogName"
            case databaseName = "DatabaseName"
            case tableName = "TableName"
            case workGroup = "WorkGroup"
        }
    }

    public struct GetTableMetadataOutput: AWSDecodableShape {
        /// An object that contains table metadata.
        public let tableMetadata: TableMetadata?

        @inlinable
        public init(tableMetadata: TableMetadata? = nil) {
            self.tableMetadata = tableMetadata
        }

        private enum CodingKeys: String, CodingKey {
            case tableMetadata = "TableMetadata"
        }
    }

    public struct GetWorkGroupInput: AWSEncodableShape {
        /// The name of the workgroup.
        public let workGroup: String

        @inlinable
        public init(workGroup: String) {
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case workGroup = "WorkGroup"
        }
    }

    public struct GetWorkGroupOutput: AWSDecodableShape {
        /// Information about the workgroup.
        public let workGroup: WorkGroup?

        @inlinable
        public init(workGroup: WorkGroup? = nil) {
            self.workGroup = workGroup
        }

        private enum CodingKeys: String, CodingKey {
            case workGroup = "WorkGroup"
        }
    }

    public struct IdentityCenterConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether the workgroup is IAM Identity Center supported.
        public let enableIdentityCenter: Bool?
        /// The IAM Identity Center instance ARN that the workgroup associates to.
        public let identityCenterInstanceArn: String?

        @inlinable
        public init(enableIdentityCenter: Bool? = nil, identityCenterInstanceArn: String? = nil) {
            self.enableIdentityCenter = enableIdentityCenter
            self.identityCenterInstanceArn = identityCenterInstanceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.identityCenterInstanceArn, name: "identityCenterInstanceArn", parent: name, max: 255)
            try self.validate(self.identityCenterInstanceArn, name: "identityCenterInstanceArn", parent: name, pattern: "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}$")
        }

        private enum CodingKeys: String, CodingKey {
            case enableIdentityCenter = "EnableIdentityCenter"
            case identityCenterInstanceArn = "IdentityCenterInstanceArn"
        }
    }

    public struct ImportNotebookInput: AWSEncodableShape {
        /// A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// The name of the notebook to import.
        public let name: String
        /// A URI that specifies the Amazon S3 location of a notebook file in ipynb format.
        public let notebookS3LocationUri: String?
        /// The notebook content to be imported. The payload must be in ipynb format.
        public let payload: String?
        /// The notebook content type. Currently, the only valid type is IPYNB.
        public let type: NotebookType
        /// The name of the Spark enabled workgroup to import the notebook to.
        public let workGroup: String

        @inlinable
        public init(clientRequestToken: String? = nil, name: String, notebookS3LocationUri: String? = nil, payload: String? = nil, type: NotebookType, workGroup: String) {
            self.clientRequestToken = clientRequestToken
            self.name = name
            self.notebookS3LocationUri = notebookS3LocationUri
            self.payload = payload
            self.type = type
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 36)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!.*[/:\\\\])[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]+$")
            try self.validate(self.notebookS3LocationUri, name: "notebookS3LocationUri", parent: name, max: 1024)
            try self.validate(self.notebookS3LocationUri, name: "notebookS3LocationUri", parent: name, pattern: "^(https|s3|S3)://([^/]+)/?(.*)$")
            try self.validate(self.payload, name: "payload", parent: name, max: 10485760)
            try self.validate(self.payload, name: "payload", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case name = "Name"
            case notebookS3LocationUri = "NotebookS3LocationUri"
            case payload = "Payload"
            case type = "Type"
            case workGroup = "WorkGroup"
        }
    }

    public struct ImportNotebookOutput: AWSDecodableShape {
        /// The ID assigned to the imported notebook.
        public let notebookId: String?

        @inlinable
        public init(notebookId: String? = nil) {
            self.notebookId = notebookId
        }

        private enum CodingKeys: String, CodingKey {
            case notebookId = "NotebookId"
        }
    }

    public struct InvalidRequestException: AWSErrorShape {
        public let athenaErrorCode: String?
        public let message: String?

        @inlinable
        public init(athenaErrorCode: String? = nil, message: String? = nil) {
            self.athenaErrorCode = athenaErrorCode
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case athenaErrorCode = "AthenaErrorCode"
            case message = "Message"
        }
    }

    public struct ListApplicationDPUSizesInput: AWSEncodableShape {
        /// Specifies the maximum number of results to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListApplicationDPUSizesOutput: AWSDecodableShape {
        /// A list of the supported DPU sizes that the application runtime supports.
        public let applicationDPUSizes: [ApplicationDPUSizes]?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(applicationDPUSizes: [ApplicationDPUSizes]? = nil, nextToken: String? = nil) {
            self.applicationDPUSizes = applicationDPUSizes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applicationDPUSizes = "ApplicationDPUSizes"
            case nextToken = "NextToken"
        }
    }

    public struct ListCalculationExecutionsRequest: AWSEncodableShape {
        /// The maximum number of calculation executions to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The session ID.
        public let sessionId: String
        /// A filter for a specific calculation execution state. A description of each state follows.  CREATING - The calculation is in the process of being created.  CREATED - The calculation has been created and is ready to run.  QUEUED - The calculation has been queued for processing.  RUNNING - The calculation is running.  CANCELING - A request to cancel the calculation has been received and the system is working to stop it.  CANCELED - The calculation is no longer running as the result of a cancel request.  COMPLETED - The calculation has completed without error.  FAILED - The calculation failed and is no longer running.
        public let stateFilter: CalculationExecutionState?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, sessionId: String, stateFilter: CalculationExecutionState? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sessionId = sessionId
            self.stateFilter = stateFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case sessionId = "SessionId"
            case stateFilter = "StateFilter"
        }
    }

    public struct ListCalculationExecutionsResponse: AWSDecodableShape {
        /// A list of CalculationSummary objects.
        public let calculations: [CalculationSummary]?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(calculations: [CalculationSummary]? = nil, nextToken: String? = nil) {
            self.calculations = calculations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case calculations = "Calculations"
            case nextToken = "NextToken"
        }
    }

    public struct ListCapacityReservationsInput: AWSEncodableShape {
        /// Specifies the maximum number of results to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListCapacityReservationsOutput: AWSDecodableShape {
        /// The capacity reservations for the current account.
        public let capacityReservations: [CapacityReservation]
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(capacityReservations: [CapacityReservation], nextToken: String? = nil) {
            self.capacityReservations = capacityReservations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case capacityReservations = "CapacityReservations"
            case nextToken = "NextToken"
        }
    }

    public struct ListDataCatalogsInput: AWSEncodableShape {
        /// Specifies the maximum number of data catalogs to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The name of the workgroup. Required if making an IAM Identity Center request.
        public let workGroup: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, workGroup: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 2)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListDataCatalogsOutput: AWSDecodableShape {
        /// A summary list of data catalogs.
        public let dataCatalogsSummary: [DataCatalogSummary]?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(dataCatalogsSummary: [DataCatalogSummary]? = nil, nextToken: String? = nil) {
            self.dataCatalogsSummary = dataCatalogsSummary
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dataCatalogsSummary = "DataCatalogsSummary"
            case nextToken = "NextToken"
        }
    }

    public struct ListDatabasesInput: AWSEncodableShape {
        /// The name of the data catalog that contains the databases to return.
        public let catalogName: String
        /// Specifies the maximum number of results to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
        public let workGroup: String?

        @inlinable
        public init(catalogName: String, maxResults: Int? = nil, nextToken: String? = nil, workGroup: String? = nil) {
            self.catalogName = catalogName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogName, name: "catalogName", parent: name, max: 256)
            try self.validate(self.catalogName, name: "catalogName", parent: name, min: 1)
            try self.validate(self.catalogName, name: "catalogName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogName = "CatalogName"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListDatabasesOutput: AWSDecodableShape {
        /// A list of databases from a data catalog.
        public let databaseList: [Database]?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(databaseList: [Database]? = nil, nextToken: String? = nil) {
            self.databaseList = databaseList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case databaseList = "DatabaseList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEngineVersionsInput: AWSEncodableShape {
        /// The maximum number of engine versions to return in this request.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEngineVersionsOutput: AWSDecodableShape {
        /// A list of engine versions that are available to choose from.
        public let engineVersions: [EngineVersion]?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(engineVersions: [EngineVersion]? = nil, nextToken: String? = nil) {
            self.engineVersions = engineVersions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case engineVersions = "EngineVersions"
            case nextToken = "NextToken"
        }
    }

    public struct ListExecutorsRequest: AWSEncodableShape {
        /// A filter for a specific executor state. A description of each state follows.  CREATING - The executor is being started, including acquiring resources.  CREATED - The executor has been started.  REGISTERED - The executor has been registered.  TERMINATING - The executor is in the process of shutting down.  TERMINATED - The executor is no longer running.  FAILED - Due to a failure, the executor is no longer running.
        public let executorStateFilter: ExecutorState?
        /// The maximum number of executors to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The session ID.
        public let sessionId: String

        @inlinable
        public init(executorStateFilter: ExecutorState? = nil, maxResults: Int? = nil, nextToken: String? = nil, sessionId: String) {
            self.executorStateFilter = executorStateFilter
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sessionId = sessionId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case executorStateFilter = "ExecutorStateFilter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case sessionId = "SessionId"
        }
    }

    public struct ListExecutorsResponse: AWSDecodableShape {
        /// Contains summary information about the executor.
        public let executorsSummary: [ExecutorsSummary]?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The session ID.
        public let sessionId: String

        @inlinable
        public init(executorsSummary: [ExecutorsSummary]? = nil, nextToken: String? = nil, sessionId: String) {
            self.executorsSummary = executorsSummary
            self.nextToken = nextToken
            self.sessionId = sessionId
        }

        private enum CodingKeys: String, CodingKey {
            case executorsSummary = "ExecutorsSummary"
            case nextToken = "NextToken"
            case sessionId = "SessionId"
        }
    }

    public struct ListNamedQueriesInput: AWSEncodableShape {
        /// The maximum number of queries to return in this request.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The name of the workgroup from which the named queries are being returned. If a workgroup is not specified, the saved queries for the primary workgroup are returned.
        public let workGroup: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, workGroup: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListNamedQueriesOutput: AWSDecodableShape {
        /// The list of unique query IDs.
        public let namedQueryIds: [String]?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(namedQueryIds: [String]? = nil, nextToken: String? = nil) {
            self.namedQueryIds = namedQueryIds
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case namedQueryIds = "NamedQueryIds"
            case nextToken = "NextToken"
        }
    }

    public struct ListNotebookMetadataInput: AWSEncodableShape {
        /// Search filter string.
        public let filters: FilterDefinition?
        /// Specifies the maximum number of results to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.
        public let nextToken: String?
        /// The name of the Spark enabled workgroup to retrieve notebook metadata for.
        public let workGroup: String

        @inlinable
        public init(filters: FilterDefinition? = nil, maxResults: Int? = nil, nextToken: String? = nil, workGroup: String) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.filters?.validate(name: "\(name).filters")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListNotebookMetadataOutput: AWSDecodableShape {
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The list of notebook metadata for the specified workgroup.
        public let notebookMetadataList: [NotebookMetadata]?

        @inlinable
        public init(nextToken: String? = nil, notebookMetadataList: [NotebookMetadata]? = nil) {
            self.nextToken = nextToken
            self.notebookMetadataList = notebookMetadataList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case notebookMetadataList = "NotebookMetadataList"
        }
    }

    public struct ListNotebookSessionsRequest: AWSEncodableShape {
        /// The maximum number of notebook sessions to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The ID of the notebook to list sessions for.
        public let notebookId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, notebookId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.notebookId = notebookId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.notebookId, name: "notebookId", parent: name, max: 36)
            try self.validate(self.notebookId, name: "notebookId", parent: name, min: 1)
            try self.validate(self.notebookId, name: "notebookId", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case notebookId = "NotebookId"
        }
    }

    public struct ListNotebookSessionsResponse: AWSDecodableShape {
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// A list of the sessions belonging to the notebook.
        public let notebookSessionsList: [NotebookSessionSummary]

        @inlinable
        public init(nextToken: String? = nil, notebookSessionsList: [NotebookSessionSummary]) {
            self.nextToken = nextToken
            self.notebookSessionsList = notebookSessionsList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case notebookSessionsList = "NotebookSessionsList"
        }
    }

    public struct ListPreparedStatementsInput: AWSEncodableShape {
        /// The maximum number of results to return in this request.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The workgroup to list the prepared statements for.
        public let workGroup: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, workGroup: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListPreparedStatementsOutput: AWSDecodableShape {
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The list of prepared statements for the workgroup.
        public let preparedStatements: [PreparedStatementSummary]?

        @inlinable
        public init(nextToken: String? = nil, preparedStatements: [PreparedStatementSummary]? = nil) {
            self.nextToken = nextToken
            self.preparedStatements = preparedStatements
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case preparedStatements = "PreparedStatements"
        }
    }

    public struct ListQueryExecutionsInput: AWSEncodableShape {
        /// The maximum number of query executions to return in this request.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The name of the workgroup from which queries are being returned. If a workgroup is not specified, a list of available query execution IDs for the queries in the primary workgroup is returned.
        public let workGroup: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, workGroup: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListQueryExecutionsOutput: AWSDecodableShape {
        /// A token to be used by the next request if this request is truncated.
        public let nextToken: String?
        /// The unique IDs of each query execution as an array of strings.
        public let queryExecutionIds: [String]?

        @inlinable
        public init(nextToken: String? = nil, queryExecutionIds: [String]? = nil) {
            self.nextToken = nextToken
            self.queryExecutionIds = queryExecutionIds
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case queryExecutionIds = "QueryExecutionIds"
        }
    }

    public struct ListSessionsRequest: AWSEncodableShape {
        /// The maximum number of sessions to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// A filter for a specific session state. A description of each state follows.  CREATING - The session is being started, including acquiring resources.  CREATED - The session has been started.  IDLE - The session is able to accept a calculation.  BUSY - The session is processing another task and is unable to accept a calculation.  TERMINATING - The session is in the process of shutting down.  TERMINATED - The session and its resources are no longer running.  DEGRADED - The session has no healthy coordinators.  FAILED - Due to a failure, the session and its resources are no longer running.
        public let stateFilter: SessionState?
        /// The workgroup to which the session belongs.
        public let workGroup: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, stateFilter: SessionState? = nil, workGroup: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.stateFilter = stateFilter
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case stateFilter = "StateFilter"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListSessionsResponse: AWSDecodableShape {
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// A list of sessions.
        public let sessions: [SessionSummary]?

        @inlinable
        public init(nextToken: String? = nil, sessions: [SessionSummary]? = nil) {
            self.nextToken = nextToken
            self.sessions = sessions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case sessions = "Sessions"
        }
    }

    public struct ListTableMetadataInput: AWSEncodableShape {
        /// The name of the data catalog for which table metadata should be returned.
        public let catalogName: String
        /// The name of the database for which table metadata should be returned.
        public let databaseName: String
        /// A regex filter that pattern-matches table names. If no expression is supplied, metadata for all tables are listed.
        public let expression: String?
        /// Specifies the maximum number of results to return.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
        public let workGroup: String?

        @inlinable
        public init(catalogName: String, databaseName: String, expression: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, workGroup: String? = nil) {
            self.catalogName = catalogName
            self.databaseName = databaseName
            self.expression = expression
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogName, name: "catalogName", parent: name, max: 256)
            try self.validate(self.catalogName, name: "catalogName", parent: name, min: 1)
            try self.validate(self.catalogName, name: "catalogName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 128)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.expression, name: "expression", parent: name, max: 256)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogName = "CatalogName"
            case databaseName = "DatabaseName"
            case expression = "Expression"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case workGroup = "WorkGroup"
        }
    }

    public struct ListTableMetadataOutput: AWSDecodableShape {
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// A list of table metadata.
        public let tableMetadataList: [TableMetadata]?

        @inlinable
        public init(nextToken: String? = nil, tableMetadataList: [TableMetadata]? = nil) {
            self.nextToken = nextToken
            self.tableMetadataList = tableMetadataList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tableMetadataList = "TableMetadataList"
        }
    }

    public struct ListTagsForResourceInput: AWSEncodableShape {
        /// The maximum number of results to be returned per request that lists the tags for the resource.
        public let maxResults: Int?
        /// The token for the next set of results, or null if there are no additional results for this request, where the request lists the tags for the resource with the specified ARN.
        public let nextToken: String?
        /// Lists the tags for the resource with the specified ARN.
        public let resourceARN: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceARN: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 75)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceOutput: AWSDecodableShape {
        /// A token to be used by the next request if this request is truncated.
        public let nextToken: String?
        /// The list of tags associated with the specified resource.
        public let tags: [Tag]?

        @inlinable
        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct ListWorkGroupsInput: AWSEncodableShape {
        /// The maximum number of workgroups to return in this request.
        public let maxResults: Int?
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListWorkGroupsOutput: AWSDecodableShape {
        /// A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
        public let nextToken: String?
        /// A list of WorkGroupSummary objects that include the names, descriptions, creation times, and states for each workgroup.
        public let workGroups: [WorkGroupSummary]?

        @inlinable
        public init(nextToken: String? = nil, workGroups: [WorkGroupSummary]? = nil) {
            self.nextToken = nextToken
            self.workGroups = workGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case workGroups = "WorkGroups"
        }
    }

    public struct ManagedQueryResultsConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// If set to true, allows you to store query results in Athena owned storage. If set to false, workgroup member stores query results in location specified under ResultConfiguration$OutputLocation. The default is false. A workgroup cannot have the ResultConfiguration$OutputLocation parameter when you set this field to true.
        public let enabled: Bool
        /// If you encrypt query and calculation results in Athena owned storage, this field indicates the encryption option (for example, SSE_KMS or CSE_KMS) and key information.
        public let encryptionConfiguration: ManagedQueryResultsEncryptionConfiguration?

        @inlinable
        public init(enabled: Bool, encryptionConfiguration: ManagedQueryResultsEncryptionConfiguration? = nil) {
            self.enabled = enabled
            self.encryptionConfiguration = encryptionConfiguration
        }

        public func validate(name: String) throws {
            try self.encryptionConfiguration?.validate(name: "\(name).encryptionConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case encryptionConfiguration = "EncryptionConfiguration"
        }
    }

    public struct ManagedQueryResultsConfigurationUpdates: AWSEncodableShape {
        /// If set to true, specifies that Athena manages query results in Athena owned storage.
        public let enabled: Bool?
        /// If you encrypt query and calculation results in Athena owned storage, this field indicates the encryption option (for example, SSE_KMS or CSE_KMS) and key information.
        public let encryptionConfiguration: ManagedQueryResultsEncryptionConfiguration?
        /// If set to true, it removes workgroup from Athena owned storage. The existing query results are cleaned up after 24hrs. You must provide query results in location specified under ResultConfiguration$OutputLocation.
        public let removeEncryptionConfiguration: Bool?

        @inlinable
        public init(enabled: Bool? = nil, encryptionConfiguration: ManagedQueryResultsEncryptionConfiguration? = nil, removeEncryptionConfiguration: Bool? = nil) {
            self.enabled = enabled
            self.encryptionConfiguration = encryptionConfiguration
            self.removeEncryptionConfiguration = removeEncryptionConfiguration
        }

        public func validate(name: String) throws {
            try self.encryptionConfiguration?.validate(name: "\(name).encryptionConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case encryptionConfiguration = "EncryptionConfiguration"
            case removeEncryptionConfiguration = "RemoveEncryptionConfiguration"
        }
    }

    public struct ManagedQueryResultsEncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of an KMS key for encrypting managed query results.
        public let kmsKey: String

        @inlinable
        public init(kmsKey: String) {
            self.kmsKey = kmsKey
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, max: 2048)
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, min: 1)
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, pattern: "^arn:aws[a-z\\-]*:kms:([a-z0-9\\-]+):\\d{12}:key/?[a-zA-Z_0-9+=,.@\\-_/]+$|^arn:aws[a-z\\-]*:kms:([a-z0-9\\-]+):\\d{12}:alias/?[a-zA-Z_0-9+=,.@\\-_/]+$|^alias/[a-zA-Z0-9/_-]+$|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKey = "KmsKey"
        }
    }

    public struct NamedQuery: AWSDecodableShape {
        /// The database to which the query belongs.
        public let database: String
        /// The query description.
        public let description: String?
        /// The query name.
        public let name: String
        /// The unique identifier of the query.
        public let namedQueryId: String?
        /// The SQL statements that make up the query.
        public let queryString: String
        /// The name of the workgroup that contains the named query.
        public let workGroup: String?

        @inlinable
        public init(database: String, description: String? = nil, name: String, namedQueryId: String? = nil, queryString: String, workGroup: String? = nil) {
            self.database = database
            self.description = description
            self.name = name
            self.namedQueryId = namedQueryId
            self.queryString = queryString
            self.workGroup = workGroup
        }

        private enum CodingKeys: String, CodingKey {
            case database = "Database"
            case description = "Description"
            case name = "Name"
            case namedQueryId = "NamedQueryId"
            case queryString = "QueryString"
            case workGroup = "WorkGroup"
        }
    }

    public struct NotebookMetadata: AWSDecodableShape {
        /// The time when the notebook was created.
        public let creationTime: Date?
        /// The time when the notebook was last modified.
        public let lastModifiedTime: Date?
        /// The name of the notebook.
        public let name: String?
        /// The notebook ID.
        public let notebookId: String?
        /// The type of notebook. Currently, the only valid type is IPYNB.
        public let type: NotebookType?
        /// The name of the Spark enabled workgroup to which the notebook belongs.
        public let workGroup: String?

        @inlinable
        public init(creationTime: Date? = nil, lastModifiedTime: Date? = nil, name: String? = nil, notebookId: String? = nil, type: NotebookType? = nil, workGroup: String? = nil) {
            self.creationTime = creationTime
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.notebookId = notebookId
            self.type = type
            self.workGroup = workGroup
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
            case notebookId = "NotebookId"
            case type = "Type"
            case workGroup = "WorkGroup"
        }
    }

    public struct NotebookSessionSummary: AWSDecodableShape {
        /// The time when the notebook session was created.
        public let creationTime: Date?
        /// The notebook session ID.
        public let sessionId: String?

        @inlinable
        public init(creationTime: Date? = nil, sessionId: String? = nil) {
            self.creationTime = creationTime
            self.sessionId = sessionId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case sessionId = "SessionId"
        }
    }

    public struct PreparedStatement: AWSDecodableShape {
        /// The description of the prepared statement.
        public let description: String?
        /// The last modified time of the prepared statement.
        public let lastModifiedTime: Date?
        /// The query string for the prepared statement.
        public let queryStatement: String?
        /// The name of the prepared statement.
        public let statementName: String?
        /// The name of the workgroup to which the prepared statement belongs.
        public let workGroupName: String?

        @inlinable
        public init(description: String? = nil, lastModifiedTime: Date? = nil, queryStatement: String? = nil, statementName: String? = nil, workGroupName: String? = nil) {
            self.description = description
            self.lastModifiedTime = lastModifiedTime
            self.queryStatement = queryStatement
            self.statementName = statementName
            self.workGroupName = workGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case lastModifiedTime = "LastModifiedTime"
            case queryStatement = "QueryStatement"
            case statementName = "StatementName"
            case workGroupName = "WorkGroupName"
        }
    }

    public struct PreparedStatementSummary: AWSDecodableShape {
        /// The last modified time of the prepared statement.
        public let lastModifiedTime: Date?
        /// The name of the prepared statement.
        public let statementName: String?

        @inlinable
        public init(lastModifiedTime: Date? = nil, statementName: String? = nil) {
            self.lastModifiedTime = lastModifiedTime
            self.statementName = statementName
        }

        private enum CodingKeys: String, CodingKey {
            case lastModifiedTime = "LastModifiedTime"
            case statementName = "StatementName"
        }
    }

    public struct PutCapacityAssignmentConfigurationInput: AWSEncodableShape {
        /// The list of assignments for the capacity assignment configuration.
        public let capacityAssignments: [CapacityAssignment]
        /// The name of the capacity reservation to put a capacity assignment configuration for.
        public let capacityReservationName: String

        @inlinable
        public init(capacityAssignments: [CapacityAssignment], capacityReservationName: String) {
            self.capacityAssignments = capacityAssignments
            self.capacityReservationName = capacityReservationName
        }

        public func validate(name: String) throws {
            try self.capacityAssignments.forEach {
                try $0.validate(name: "\(name).capacityAssignments[]")
            }
            try self.validate(self.capacityReservationName, name: "capacityReservationName", parent: name, max: 128)
            try self.validate(self.capacityReservationName, name: "capacityReservationName", parent: name, min: 1)
            try self.validate(self.capacityReservationName, name: "capacityReservationName", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case capacityAssignments = "CapacityAssignments"
            case capacityReservationName = "CapacityReservationName"
        }
    }

    public struct PutCapacityAssignmentConfigurationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct QueryExecution: AWSDecodableShape {
        /// The engine version that executed the query.
        public let engineVersion: EngineVersion?
        /// A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur. The list of parameters is not returned in the response.
        public let executionParameters: [String]?
        ///  The configuration for storing results in Athena owned storage, which includes whether this feature is enabled; whether encryption configuration, if any, is used for encrypting query results.
        public let managedQueryResultsConfiguration: ManagedQueryResultsConfiguration?
        /// The SQL query statements which the query execution ran.
        public let query: String?
        /// The database in which the query execution occurred.
        public let queryExecutionContext: QueryExecutionContext?
        /// The unique identifier for each query execution.
        public let queryExecutionId: String?
        /// Specifies whether Amazon S3 access grants are enabled for query results.
        public let queryResultsS3AccessGrantsConfiguration: QueryResultsS3AccessGrantsConfiguration?
        /// The location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query results. These are known as "client-side settings". If workgroup settings override client-side settings, then the query uses the location for the query results and the encryption configuration that are specified for the workgroup.
        public let resultConfiguration: ResultConfiguration?
        /// Specifies the query result reuse behavior that was used for the query.
        public let resultReuseConfiguration: ResultReuseConfiguration?
        /// The type of query statement that was run. DDL indicates DDL query statements. DML indicates DML (Data Manipulation Language) query statements, such as CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL and DML, such as SHOW CREATE TABLE, or DESCRIBE TABLE.
        public let statementType: StatementType?
        /// Query execution statistics, such as the amount of data scanned, the amount of time that the query took to process, and the type of statement that was run.
        public let statistics: QueryExecutionStatistics?
        /// The completion date, current state, submission time, and state change reason (if applicable) for the query execution.
        public let status: QueryExecutionStatus?
        /// The kind of query statement that was run.
        public let substatementType: String?
        /// The name of the workgroup in which the query ran.
        public let workGroup: String?

        @inlinable
        public init(engineVersion: EngineVersion? = nil, executionParameters: [String]? = nil, managedQueryResultsConfiguration: ManagedQueryResultsConfiguration? = nil, query: String? = nil, queryExecutionContext: QueryExecutionContext? = nil, queryExecutionId: String? = nil, queryResultsS3AccessGrantsConfiguration: QueryResultsS3AccessGrantsConfiguration? = nil, resultConfiguration: ResultConfiguration? = nil, resultReuseConfiguration: ResultReuseConfiguration? = nil, statementType: StatementType? = nil, statistics: QueryExecutionStatistics? = nil, status: QueryExecutionStatus? = nil, substatementType: String? = nil, workGroup: String? = nil) {
            self.engineVersion = engineVersion
            self.executionParameters = executionParameters
            self.managedQueryResultsConfiguration = managedQueryResultsConfiguration
            self.query = query
            self.queryExecutionContext = queryExecutionContext
            self.queryExecutionId = queryExecutionId
            self.queryResultsS3AccessGrantsConfiguration = queryResultsS3AccessGrantsConfiguration
            self.resultConfiguration = resultConfiguration
            self.resultReuseConfiguration = resultReuseConfiguration
            self.statementType = statementType
            self.statistics = statistics
            self.status = status
            self.substatementType = substatementType
            self.workGroup = workGroup
        }

        private enum CodingKeys: String, CodingKey {
            case engineVersion = "EngineVersion"
            case executionParameters = "ExecutionParameters"
            case managedQueryResultsConfiguration = "ManagedQueryResultsConfiguration"
            case query = "Query"
            case queryExecutionContext = "QueryExecutionContext"
            case queryExecutionId = "QueryExecutionId"
            case queryResultsS3AccessGrantsConfiguration = "QueryResultsS3AccessGrantsConfiguration"
            case resultConfiguration = "ResultConfiguration"
            case resultReuseConfiguration = "ResultReuseConfiguration"
            case statementType = "StatementType"
            case statistics = "Statistics"
            case status = "Status"
            case substatementType = "SubstatementType"
            case workGroup = "WorkGroup"
        }
    }

    public struct QueryExecutionContext: AWSEncodableShape & AWSDecodableShape {
        /// The name of the data catalog used in the query execution.
        public let catalog: String?
        /// The name of the database used in the query execution. The database must exist in the catalog.
        public let database: String?

        @inlinable
        public init(catalog: String? = nil, database: String? = nil) {
            self.catalog = catalog
            self.database = database
        }

        public func validate(name: String) throws {
            try self.validate(self.catalog, name: "catalog", parent: name, max: 256)
            try self.validate(self.catalog, name: "catalog", parent: name, min: 1)
            try self.validate(self.catalog, name: "catalog", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.database, name: "database", parent: name, max: 255)
            try self.validate(self.database, name: "database", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalog = "Catalog"
            case database = "Database"
        }
    }

    public struct QueryExecutionStatistics: AWSDecodableShape {
        /// The location and file name of a data manifest file. The manifest file is saved to the Athena query results location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned files resulting from a failed query. For more information, see Working with Query Results, Output Files, and Query History in the Amazon Athena User Guide.
        public let dataManifestLocation: String?
        /// The number of bytes in the data that was queried.
        public let dataScannedInBytes: Int64?
        /// The number of milliseconds that the query took to execute.
        public let engineExecutionTimeInMillis: Int64?
        /// The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. Note that because the query engine performs the query planning, query planning time is a subset of engine processing time.
        public let queryPlanningTimeInMillis: Int64?
        /// The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient errors occur, Athena might automatically add the query back to the queue.
        public let queryQueueTimeInMillis: Int64?
        /// Contains information about whether previous query results were reused for the query.
        public let resultReuseInformation: ResultReuseInformation?
        /// The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine.
        public let servicePreProcessingTimeInMillis: Int64?
        /// The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.
        public let serviceProcessingTimeInMillis: Int64?
        /// The number of milliseconds that Athena took to run the query.
        public let totalExecutionTimeInMillis: Int64?

        @inlinable
        public init(dataManifestLocation: String? = nil, dataScannedInBytes: Int64? = nil, engineExecutionTimeInMillis: Int64? = nil, queryPlanningTimeInMillis: Int64? = nil, queryQueueTimeInMillis: Int64? = nil, resultReuseInformation: ResultReuseInformation? = nil, servicePreProcessingTimeInMillis: Int64? = nil, serviceProcessingTimeInMillis: Int64? = nil, totalExecutionTimeInMillis: Int64? = nil) {
            self.dataManifestLocation = dataManifestLocation
            self.dataScannedInBytes = dataScannedInBytes
            self.engineExecutionTimeInMillis = engineExecutionTimeInMillis
            self.queryPlanningTimeInMillis = queryPlanningTimeInMillis
            self.queryQueueTimeInMillis = queryQueueTimeInMillis
            self.resultReuseInformation = resultReuseInformation
            self.servicePreProcessingTimeInMillis = servicePreProcessingTimeInMillis
            self.serviceProcessingTimeInMillis = serviceProcessingTimeInMillis
            self.totalExecutionTimeInMillis = totalExecutionTimeInMillis
        }

        private enum CodingKeys: String, CodingKey {
            case dataManifestLocation = "DataManifestLocation"
            case dataScannedInBytes = "DataScannedInBytes"
            case engineExecutionTimeInMillis = "EngineExecutionTimeInMillis"
            case queryPlanningTimeInMillis = "QueryPlanningTimeInMillis"
            case queryQueueTimeInMillis = "QueryQueueTimeInMillis"
            case resultReuseInformation = "ResultReuseInformation"
            case servicePreProcessingTimeInMillis = "ServicePreProcessingTimeInMillis"
            case serviceProcessingTimeInMillis = "ServiceProcessingTimeInMillis"
            case totalExecutionTimeInMillis = "TotalExecutionTimeInMillis"
        }
    }

    public struct QueryExecutionStatus: AWSDecodableShape {
        /// Provides information about an Athena query error.
        public let athenaError: AthenaError?
        /// The date and time that the query completed.
        public let completionDateTime: Date?
        /// The state of query execution. QUEUED indicates that the query has been submitted to the service, and Athena will execute the query as soon as resources are available. RUNNING indicates that the query is in execution phase. SUCCEEDED indicates that the query completed without errors. FAILED indicates that the query experienced an error and did not complete processing. CANCELLED indicates that a user input interrupted query execution.  Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the query state transition from RUNNING or FAILED to QUEUED.
        public let state: QueryExecutionState?
        /// Further detail about the status of the query.
        public let stateChangeReason: String?
        /// The date and time that the query was submitted.
        public let submissionDateTime: Date?

        @inlinable
        public init(athenaError: AthenaError? = nil, completionDateTime: Date? = nil, state: QueryExecutionState? = nil, stateChangeReason: String? = nil, submissionDateTime: Date? = nil) {
            self.athenaError = athenaError
            self.completionDateTime = completionDateTime
            self.state = state
            self.stateChangeReason = stateChangeReason
            self.submissionDateTime = submissionDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case athenaError = "AthenaError"
            case completionDateTime = "CompletionDateTime"
            case state = "State"
            case stateChangeReason = "StateChangeReason"
            case submissionDateTime = "SubmissionDateTime"
        }
    }

    public struct QueryResultsS3AccessGrantsConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The authentication type used for Amazon S3 access grants. Currently, only DIRECTORY_IDENTITY is supported.
        public let authenticationType: AuthenticationType
        /// When enabled, appends the user ID as an Amazon S3 path prefix to the query result output location.
        public let createUserLevelPrefix: Bool?
        /// Specifies whether Amazon S3 access grants are enabled for query results.
        public let enableS3AccessGrants: Bool

        @inlinable
        public init(authenticationType: AuthenticationType, createUserLevelPrefix: Bool? = nil, enableS3AccessGrants: Bool) {
            self.authenticationType = authenticationType
            self.createUserLevelPrefix = createUserLevelPrefix
            self.enableS3AccessGrants = enableS3AccessGrants
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationType = "AuthenticationType"
            case createUserLevelPrefix = "CreateUserLevelPrefix"
            case enableS3AccessGrants = "EnableS3AccessGrants"
        }
    }

    public struct QueryRuntimeStatistics: AWSDecodableShape {
        /// Stage statistics such as input and output rows and bytes, execution time, and stage state. This information also includes substages and the query stage plan.
        public let outputStage: QueryStage?
        public let rows: QueryRuntimeStatisticsRows?
        public let timeline: QueryRuntimeStatisticsTimeline?

        @inlinable
        public init(outputStage: QueryStage? = nil, rows: QueryRuntimeStatisticsRows? = nil, timeline: QueryRuntimeStatisticsTimeline? = nil) {
            self.outputStage = outputStage
            self.rows = rows
            self.timeline = timeline
        }

        private enum CodingKeys: String, CodingKey {
            case outputStage = "OutputStage"
            case rows = "Rows"
            case timeline = "Timeline"
        }
    }

    public struct QueryRuntimeStatisticsRows: AWSDecodableShape {
        /// The number of bytes read to execute the query.
        public let inputBytes: Int64?
        /// The number of rows read to execute the query.
        public let inputRows: Int64?
        /// The number of bytes returned by the query.
        public let outputBytes: Int64?
        /// The number of rows returned by the query.
        public let outputRows: Int64?

        @inlinable
        public init(inputBytes: Int64? = nil, inputRows: Int64? = nil, outputBytes: Int64? = nil, outputRows: Int64? = nil) {
            self.inputBytes = inputBytes
            self.inputRows = inputRows
            self.outputBytes = outputBytes
            self.outputRows = outputRows
        }

        private enum CodingKeys: String, CodingKey {
            case inputBytes = "InputBytes"
            case inputRows = "InputRows"
            case outputBytes = "OutputBytes"
            case outputRows = "OutputRows"
        }
    }

    public struct QueryRuntimeStatisticsTimeline: AWSDecodableShape {
        /// The number of milliseconds that the query took to execute.
        public let engineExecutionTimeInMillis: Int64?
        /// The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. Note that because the query engine performs the query planning, query planning time is a subset of engine processing time.
        public let queryPlanningTimeInMillis: Int64?
        /// The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient errors occur, Athena might automatically add the query back to the queue.
        public let queryQueueTimeInMillis: Int64?
        ///  The number of milliseconds that Athena spends on preprocessing before it submits the query to the engine.
        public let servicePreProcessingTimeInMillis: Int64?
        /// The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.
        public let serviceProcessingTimeInMillis: Int64?
        /// The number of milliseconds that Athena took to run the query.
        public let totalExecutionTimeInMillis: Int64?

        @inlinable
        public init(engineExecutionTimeInMillis: Int64? = nil, queryPlanningTimeInMillis: Int64? = nil, queryQueueTimeInMillis: Int64? = nil, servicePreProcessingTimeInMillis: Int64? = nil, serviceProcessingTimeInMillis: Int64? = nil, totalExecutionTimeInMillis: Int64? = nil) {
            self.engineExecutionTimeInMillis = engineExecutionTimeInMillis
            self.queryPlanningTimeInMillis = queryPlanningTimeInMillis
            self.queryQueueTimeInMillis = queryQueueTimeInMillis
            self.servicePreProcessingTimeInMillis = servicePreProcessingTimeInMillis
            self.serviceProcessingTimeInMillis = serviceProcessingTimeInMillis
            self.totalExecutionTimeInMillis = totalExecutionTimeInMillis
        }

        private enum CodingKeys: String, CodingKey {
            case engineExecutionTimeInMillis = "EngineExecutionTimeInMillis"
            case queryPlanningTimeInMillis = "QueryPlanningTimeInMillis"
            case queryQueueTimeInMillis = "QueryQueueTimeInMillis"
            case servicePreProcessingTimeInMillis = "ServicePreProcessingTimeInMillis"
            case serviceProcessingTimeInMillis = "ServiceProcessingTimeInMillis"
            case totalExecutionTimeInMillis = "TotalExecutionTimeInMillis"
        }
    }

    public struct QueryStage: AWSDecodableShape {
        /// Time taken to execute this stage.
        public let executionTime: Int64?
        /// The number of bytes input into the stage for execution.
        public let inputBytes: Int64?
        /// The number of rows input into the stage for execution.
        public let inputRows: Int64?
        /// The number of bytes output from the stage after execution.
        public let outputBytes: Int64?
        /// The number of rows output from the stage after execution.
        public let outputRows: Int64?
        /// Stage plan information such as name, identifier, sub plans, and source stages.
        public let queryStagePlan: QueryStagePlanNode?
        /// The identifier for a stage.
        public let stageId: Int64?
        /// State of the stage after query execution.
        public let state: String?
        /// List of sub query stages that form this stage execution plan.
        public let subStages: [QueryStage]?

        @inlinable
        public init(executionTime: Int64? = nil, inputBytes: Int64? = nil, inputRows: Int64? = nil, outputBytes: Int64? = nil, outputRows: Int64? = nil, queryStagePlan: QueryStagePlanNode? = nil, stageId: Int64? = nil, state: String? = nil, subStages: [QueryStage]? = nil) {
            self.executionTime = executionTime
            self.inputBytes = inputBytes
            self.inputRows = inputRows
            self.outputBytes = outputBytes
            self.outputRows = outputRows
            self.queryStagePlan = queryStagePlan
            self.stageId = stageId
            self.state = state
            self.subStages = subStages
        }

        private enum CodingKeys: String, CodingKey {
            case executionTime = "ExecutionTime"
            case inputBytes = "InputBytes"
            case inputRows = "InputRows"
            case outputBytes = "OutputBytes"
            case outputRows = "OutputRows"
            case queryStagePlan = "QueryStagePlan"
            case stageId = "StageId"
            case state = "State"
            case subStages = "SubStages"
        }
    }

    public struct QueryStagePlanNode: AWSDecodableShape {
        /// Stage plan information such as name, identifier, sub plans, and remote sources of child plan nodes/
        public let children: [QueryStagePlanNode]?
        /// Information about the operation this query stage plan node is performing.
        public let identifier: String?
        /// Name of the query stage plan that describes the operation this stage is performing as part of query execution.
        public let name: String?
        /// Source plan node IDs.
        public let remoteSources: [String]?

        @inlinable
        public init(children: [QueryStagePlanNode]? = nil, identifier: String? = nil, name: String? = nil, remoteSources: [String]? = nil) {
            self.children = children
            self.identifier = identifier
            self.name = name
            self.remoteSources = remoteSources
        }

        private enum CodingKeys: String, CodingKey {
            case children = "Children"
            case identifier = "Identifier"
            case name = "Name"
            case remoteSources = "RemoteSources"
        }
    }

    public struct ResourceNotFoundException: AWSErrorShape {
        public let message: String?
        /// The name of the Amazon resource.
        public let resourceName: String?

        @inlinable
        public init(message: String? = nil, resourceName: String? = nil) {
            self.message = message
            self.resourceName = resourceName
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case resourceName = "ResourceName"
        }
    }

    public struct ResultConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is BUCKET_OWNER_FULL_CONTROL. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.
        public let aclConfiguration: AclConfiguration?
        /// If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.
        public let encryptionConfiguration: EncryptionConfiguration?
        /// The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for ExpectedBucketOwner when it makes Amazon S3 calls to your specified output location. If the ExpectedBucketOwner Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ExpectedBucketOwner setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.
        public let expectedBucketOwner: String?
        /// The location in Amazon S3 where your query and calculation results are stored, such as s3://path/to/query/bucket/. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
        public let outputLocation: String?

        @inlinable
        public init(aclConfiguration: AclConfiguration? = nil, encryptionConfiguration: EncryptionConfiguration? = nil, expectedBucketOwner: String? = nil, outputLocation: String? = nil) {
            self.aclConfiguration = aclConfiguration
            self.encryptionConfiguration = encryptionConfiguration
            self.expectedBucketOwner = expectedBucketOwner
            self.outputLocation = outputLocation
        }

        public func validate(name: String) throws {
            try self.validate(self.expectedBucketOwner, name: "expectedBucketOwner", parent: name, max: 12)
            try self.validate(self.expectedBucketOwner, name: "expectedBucketOwner", parent: name, min: 12)
            try self.validate(self.expectedBucketOwner, name: "expectedBucketOwner", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case aclConfiguration = "AclConfiguration"
            case encryptionConfiguration = "EncryptionConfiguration"
            case expectedBucketOwner = "ExpectedBucketOwner"
            case outputLocation = "OutputLocation"
        }
    }

    public struct ResultConfigurationUpdates: AWSEncodableShape {
        /// The ACL configuration for the query results.
        public let aclConfiguration: AclConfiguration?
        /// The encryption configuration for query and calculation results.
        public let encryptionConfiguration: EncryptionConfiguration?
        /// The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for ExpectedBucketOwner when it makes Amazon S3 calls to your specified output location. If the ExpectedBucketOwner Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error. If workgroup settings override client-side settings, then the query uses the ExpectedBucketOwner setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.
        public let expectedBucketOwner: String?
        /// The location in Amazon S3 where your query and calculation results are stored, such as s3://path/to/query/bucket/. If workgroup settings override client-side settings, then the query uses the location for the query results and the encryption configuration that are specified for the workgroup. The "workgroup settings override" is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
        public let outputLocation: String?
        /// If set to true, indicates that the previously-specified ACL configuration for queries in this workgroup should be ignored and set to null. If set to false or not set, and a value is present in the AclConfiguration of ResultConfigurationUpdates, the AclConfiguration in the workgroup's ResultConfiguration is updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.
        public let removeAclConfiguration: Bool?
        /// If set to "true", indicates that the previously-specified encryption configuration (also known as the client-side setting) for queries in this workgroup should be ignored and set to null. If set to "false" or not set, and a value is present in the EncryptionConfiguration in ResultConfigurationUpdates (the client-side setting), the EncryptionConfiguration in the workgroup's ResultConfiguration will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.
        public let removeEncryptionConfiguration: Bool?
        /// If set to "true", removes the Amazon Web Services account ID previously specified for ResultConfiguration$ExpectedBucketOwner. If set to "false" or not set, and a value is present in the ExpectedBucketOwner in ResultConfigurationUpdates (the client-side setting), the ExpectedBucketOwner in the workgroup's ResultConfiguration is updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.
        public let removeExpectedBucketOwner: Bool?
        /// If set to "true", indicates that the previously-specified query results location (also known as a client-side setting) for queries in this workgroup should be ignored and set to null. If set to "false" or not set, and a value is present in the OutputLocation in ResultConfigurationUpdates (the client-side setting), the OutputLocation in the workgroup's ResultConfiguration will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.
        public let removeOutputLocation: Bool?

        @inlinable
        public init(aclConfiguration: AclConfiguration? = nil, encryptionConfiguration: EncryptionConfiguration? = nil, expectedBucketOwner: String? = nil, outputLocation: String? = nil, removeAclConfiguration: Bool? = nil, removeEncryptionConfiguration: Bool? = nil, removeExpectedBucketOwner: Bool? = nil, removeOutputLocation: Bool? = nil) {
            self.aclConfiguration = aclConfiguration
            self.encryptionConfiguration = encryptionConfiguration
            self.expectedBucketOwner = expectedBucketOwner
            self.outputLocation = outputLocation
            self.removeAclConfiguration = removeAclConfiguration
            self.removeEncryptionConfiguration = removeEncryptionConfiguration
            self.removeExpectedBucketOwner = removeExpectedBucketOwner
            self.removeOutputLocation = removeOutputLocation
        }

        public func validate(name: String) throws {
            try self.validate(self.expectedBucketOwner, name: "expectedBucketOwner", parent: name, max: 12)
            try self.validate(self.expectedBucketOwner, name: "expectedBucketOwner", parent: name, min: 12)
            try self.validate(self.expectedBucketOwner, name: "expectedBucketOwner", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case aclConfiguration = "AclConfiguration"
            case encryptionConfiguration = "EncryptionConfiguration"
            case expectedBucketOwner = "ExpectedBucketOwner"
            case outputLocation = "OutputLocation"
            case removeAclConfiguration = "RemoveAclConfiguration"
            case removeEncryptionConfiguration = "RemoveEncryptionConfiguration"
            case removeExpectedBucketOwner = "RemoveExpectedBucketOwner"
            case removeOutputLocation = "RemoveOutputLocation"
        }
    }

    public struct ResultReuseByAgeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// True if previous query results can be reused when the query is run; otherwise, false. The default is false.
        public let enabled: Bool
        /// Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. The default is 60.
        public let maxAgeInMinutes: Int?

        @inlinable
        public init(enabled: Bool, maxAgeInMinutes: Int? = nil) {
            self.enabled = enabled
            self.maxAgeInMinutes = maxAgeInMinutes
        }

        public func validate(name: String) throws {
            try self.validate(self.maxAgeInMinutes, name: "maxAgeInMinutes", parent: name, max: 10080)
            try self.validate(self.maxAgeInMinutes, name: "maxAgeInMinutes", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case maxAgeInMinutes = "MaxAgeInMinutes"
        }
    }

    public struct ResultReuseConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether previous query results are reused, and if so, their maximum age.
        public let resultReuseByAgeConfiguration: ResultReuseByAgeConfiguration?

        @inlinable
        public init(resultReuseByAgeConfiguration: ResultReuseByAgeConfiguration? = nil) {
            self.resultReuseByAgeConfiguration = resultReuseByAgeConfiguration
        }

        public func validate(name: String) throws {
            try self.resultReuseByAgeConfiguration?.validate(name: "\(name).resultReuseByAgeConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case resultReuseByAgeConfiguration = "ResultReuseByAgeConfiguration"
        }
    }

    public struct ResultReuseInformation: AWSDecodableShape {
        /// True if a previous query result was reused; false if the result was generated from a new run of the query.
        public let reusedPreviousResult: Bool

        @inlinable
        public init(reusedPreviousResult: Bool) {
            self.reusedPreviousResult = reusedPreviousResult
        }

        private enum CodingKeys: String, CodingKey {
            case reusedPreviousResult = "ReusedPreviousResult"
        }
    }

    public struct ResultSet: AWSDecodableShape {
        /// The metadata that describes the column structure and data types of a table of query results.
        public let resultSetMetadata: ResultSetMetadata?
        /// The rows in the table.
        public let rows: [Row]?

        @inlinable
        public init(resultSetMetadata: ResultSetMetadata? = nil, rows: [Row]? = nil) {
            self.resultSetMetadata = resultSetMetadata
            self.rows = rows
        }

        private enum CodingKeys: String, CodingKey {
            case resultSetMetadata = "ResultSetMetadata"
            case rows = "Rows"
        }
    }

    public struct ResultSetMetadata: AWSDecodableShape {
        /// Information about the columns returned in a query result metadata.
        public let columnInfo: [ColumnInfo]?

        @inlinable
        public init(columnInfo: [ColumnInfo]? = nil) {
            self.columnInfo = columnInfo
        }

        private enum CodingKeys: String, CodingKey {
            case columnInfo = "ColumnInfo"
        }
    }

    public struct Row: AWSDecodableShape {
        /// The data that populates a row in a query result table.
        public let data: [Datum]?

        @inlinable
        public init(data: [Datum]? = nil) {
            self.data = data
        }

        private enum CodingKeys: String, CodingKey {
            case data = "Data"
        }
    }

    public struct SessionConfiguration: AWSDecodableShape {
        public let encryptionConfiguration: EncryptionConfiguration?
        /// The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
        public let executionRole: String?
        /// The idle timeout in seconds for the session.
        public let idleTimeoutSeconds: Int64?
        /// The Amazon S3 location that stores information for the notebook.
        public let workingDirectory: String?

        @inlinable
        public init(encryptionConfiguration: EncryptionConfiguration? = nil, executionRole: String? = nil, idleTimeoutSeconds: Int64? = nil, workingDirectory: String? = nil) {
            self.encryptionConfiguration = encryptionConfiguration
            self.executionRole = executionRole
            self.idleTimeoutSeconds = idleTimeoutSeconds
            self.workingDirectory = workingDirectory
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionConfiguration = "EncryptionConfiguration"
            case executionRole = "ExecutionRole"
            case idleTimeoutSeconds = "IdleTimeoutSeconds"
            case workingDirectory = "WorkingDirectory"
        }
    }

    public struct SessionStatistics: AWSDecodableShape {
        /// The data processing unit execution time for a session in milliseconds.
        public let dpuExecutionInMillis: Int64?

        @inlinable
        public init(dpuExecutionInMillis: Int64? = nil) {
            self.dpuExecutionInMillis = dpuExecutionInMillis
        }

        private enum CodingKeys: String, CodingKey {
            case dpuExecutionInMillis = "DpuExecutionInMillis"
        }
    }

    public struct SessionStatus: AWSDecodableShape {
        /// The date and time that the session ended.
        public let endDateTime: Date?
        /// The date and time starting at which the session became idle. Can be empty if the session is not currently idle.
        public let idleSinceDateTime: Date?
        /// The most recent date and time that the session was modified.
        public let lastModifiedDateTime: Date?
        /// The date and time that the session started.
        public let startDateTime: Date?
        /// The state of the session. A description of each state follows.  CREATING - The session is being started, including acquiring resources.  CREATED - The session has been started.  IDLE - The session is able to accept a calculation.  BUSY - The session is processing another task and is unable to accept a calculation.  TERMINATING - The session is in the process of shutting down.  TERMINATED - The session and its resources are no longer running.  DEGRADED - The session has no healthy coordinators.  FAILED - Due to a failure, the session and its resources are no longer running.
        public let state: SessionState?
        /// The reason for the session state change (for example, canceled because the session was terminated).
        public let stateChangeReason: String?

        @inlinable
        public init(endDateTime: Date? = nil, idleSinceDateTime: Date? = nil, lastModifiedDateTime: Date? = nil, startDateTime: Date? = nil, state: SessionState? = nil, stateChangeReason: String? = nil) {
            self.endDateTime = endDateTime
            self.idleSinceDateTime = idleSinceDateTime
            self.lastModifiedDateTime = lastModifiedDateTime
            self.startDateTime = startDateTime
            self.state = state
            self.stateChangeReason = stateChangeReason
        }

        private enum CodingKeys: String, CodingKey {
            case endDateTime = "EndDateTime"
            case idleSinceDateTime = "IdleSinceDateTime"
            case lastModifiedDateTime = "LastModifiedDateTime"
            case startDateTime = "StartDateTime"
            case state = "State"
            case stateChangeReason = "StateChangeReason"
        }
    }

    public struct SessionSummary: AWSDecodableShape {
        /// The session description.
        public let description: String?
        /// The engine version used by the session (for example, PySpark engine version 3).
        public let engineVersion: EngineVersion?
        /// The notebook version.
        public let notebookVersion: String?
        /// The session ID.
        public let sessionId: String?
        /// Contains information about the session status.
        public let status: SessionStatus?

        @inlinable
        public init(description: String? = nil, engineVersion: EngineVersion? = nil, notebookVersion: String? = nil, sessionId: String? = nil, status: SessionStatus? = nil) {
            self.description = description
            self.engineVersion = engineVersion
            self.notebookVersion = notebookVersion
            self.sessionId = sessionId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case engineVersion = "EngineVersion"
            case notebookVersion = "NotebookVersion"
            case sessionId = "SessionId"
            case status = "Status"
        }
    }

    public struct StartCalculationExecutionRequest: AWSEncodableShape {
        /// Contains configuration information for the calculation.
        public let calculationConfiguration: CalculationConfiguration?
        /// A unique case-sensitive string used to ensure the request to create the calculation is idempotent (executes only once). If another StartCalculationExecutionRequest is received, the same response is returned and another calculation is not created. If a parameter has changed, an error is returned.  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// A string that contains the code of the calculation. Use this parameter instead of CalculationConfiguration$CodeBlock, which is deprecated.
        public let codeBlock: String?
        /// A description of the calculation.
        public let description: String?
        /// The session ID.
        public let sessionId: String

        @inlinable
        public init(clientRequestToken: String? = nil, codeBlock: String? = nil, description: String? = nil, sessionId: String) {
            self.calculationConfiguration = nil
            self.clientRequestToken = clientRequestToken
            self.codeBlock = codeBlock
            self.description = description
            self.sessionId = sessionId
        }

        @available(*, deprecated, message: "Members calculationConfiguration have been deprecated")
        @inlinable
        public init(calculationConfiguration: CalculationConfiguration? = nil, clientRequestToken: String? = nil, codeBlock: String? = nil, description: String? = nil, sessionId: String) {
            self.calculationConfiguration = calculationConfiguration
            self.clientRequestToken = clientRequestToken
            self.codeBlock = codeBlock
            self.description = description
            self.sessionId = sessionId
        }

        public func validate(name: String) throws {
            try self.calculationConfiguration?.validate(name: "\(name).calculationConfiguration")
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 128)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 32)
            try self.validate(self.codeBlock, name: "codeBlock", parent: name, max: 68000)
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case calculationConfiguration = "CalculationConfiguration"
            case clientRequestToken = "ClientRequestToken"
            case codeBlock = "CodeBlock"
            case description = "Description"
            case sessionId = "SessionId"
        }
    }

    public struct StartCalculationExecutionResponse: AWSDecodableShape {
        /// The calculation execution UUID.
        public let calculationExecutionId: String?
        ///  CREATING - The calculation is in the process of being created.  CREATED - The calculation has been created and is ready to run.  QUEUED - The calculation has been queued for processing.  RUNNING - The calculation is running.  CANCELING - A request to cancel the calculation has been received and the system is working to stop it.  CANCELED - The calculation is no longer running as the result of a cancel request.  COMPLETED - The calculation has completed without error.  FAILED - The calculation failed and is no longer running.
        public let state: CalculationExecutionState?

        @inlinable
        public init(calculationExecutionId: String? = nil, state: CalculationExecutionState? = nil) {
            self.calculationExecutionId = calculationExecutionId
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case calculationExecutionId = "CalculationExecutionId"
            case state = "State"
        }
    }

    public struct StartQueryExecutionInput: AWSEncodableShape {
        /// A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. An error is returned if a parameter, such as QueryString, has changed. A call to StartQueryExecution that uses a previous client request token returns the same QueryExecutionId even if the requester doesn't have permission on the tables specified in QueryString.  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur.
        public let executionParameters: [String]?
        /// The database within which the query executes.
        public let queryExecutionContext: QueryExecutionContext?
        /// The SQL query statements to be executed.
        public let queryString: String
        /// Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
        public let resultConfiguration: ResultConfiguration?
        /// Specifies the query result reuse behavior for the query.
        public let resultReuseConfiguration: ResultReuseConfiguration?
        /// The name of the workgroup in which the query is being started.
        public let workGroup: String?

        @inlinable
        public init(clientRequestToken: String? = StartQueryExecutionInput.idempotencyToken(), executionParameters: [String]? = nil, queryExecutionContext: QueryExecutionContext? = nil, queryString: String, resultConfiguration: ResultConfiguration? = nil, resultReuseConfiguration: ResultReuseConfiguration? = nil, workGroup: String? = nil) {
            self.clientRequestToken = clientRequestToken
            self.executionParameters = executionParameters
            self.queryExecutionContext = queryExecutionContext
            self.queryString = queryString
            self.resultConfiguration = resultConfiguration
            self.resultReuseConfiguration = resultReuseConfiguration
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 128)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 32)
            try self.executionParameters?.forEach {
                try validate($0, name: "executionParameters[]", parent: name, max: 1024)
                try validate($0, name: "executionParameters[]", parent: name, min: 1)
            }
            try self.validate(self.executionParameters, name: "executionParameters", parent: name, min: 1)
            try self.queryExecutionContext?.validate(name: "\(name).queryExecutionContext")
            try self.validate(self.queryString, name: "queryString", parent: name, max: 262144)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.resultConfiguration?.validate(name: "\(name).resultConfiguration")
            try self.resultReuseConfiguration?.validate(name: "\(name).resultReuseConfiguration")
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case executionParameters = "ExecutionParameters"
            case queryExecutionContext = "QueryExecutionContext"
            case queryString = "QueryString"
            case resultConfiguration = "ResultConfiguration"
            case resultReuseConfiguration = "ResultReuseConfiguration"
            case workGroup = "WorkGroup"
        }
    }

    public struct StartQueryExecutionOutput: AWSDecodableShape {
        /// The unique ID of the query that ran as a result of this request.
        public let queryExecutionId: String?

        @inlinable
        public init(queryExecutionId: String? = nil) {
            self.queryExecutionId = queryExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case queryExecutionId = "QueryExecutionId"
        }
    }

    public struct StartSessionRequest: AWSEncodableShape {
        /// A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another StartSessionRequest is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// The session description.
        public let description: String?
        /// Contains engine data processing unit (DPU) configuration settings and parameter mappings.
        public let engineConfiguration: EngineConfiguration
        /// The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is Athena notebook version 1. If you specify a value for NotebookVersion, you must also specify a value for NotebookId. See EngineConfiguration$AdditionalConfigs.
        public let notebookVersion: String?
        /// The idle timeout in minutes for the session.
        public let sessionIdleTimeoutInMinutes: Int?
        /// The workgroup to which the session belongs.
        public let workGroup: String

        @inlinable
        public init(clientRequestToken: String? = nil, description: String? = nil, engineConfiguration: EngineConfiguration, notebookVersion: String? = nil, sessionIdleTimeoutInMinutes: Int? = nil, workGroup: String) {
            self.clientRequestToken = clientRequestToken
            self.description = description
            self.engineConfiguration = engineConfiguration
            self.notebookVersion = notebookVersion
            self.sessionIdleTimeoutInMinutes = sessionIdleTimeoutInMinutes
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 128)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 32)
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.engineConfiguration.validate(name: "\(name).engineConfiguration")
            try self.validate(self.notebookVersion, name: "notebookVersion", parent: name, max: 128)
            try self.validate(self.notebookVersion, name: "notebookVersion", parent: name, min: 1)
            try self.validate(self.sessionIdleTimeoutInMinutes, name: "sessionIdleTimeoutInMinutes", parent: name, max: 480)
            try self.validate(self.sessionIdleTimeoutInMinutes, name: "sessionIdleTimeoutInMinutes", parent: name, min: 1)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case description = "Description"
            case engineConfiguration = "EngineConfiguration"
            case notebookVersion = "NotebookVersion"
            case sessionIdleTimeoutInMinutes = "SessionIdleTimeoutInMinutes"
            case workGroup = "WorkGroup"
        }
    }

    public struct StartSessionResponse: AWSDecodableShape {
        /// The session ID.
        public let sessionId: String?
        /// The state of the session. A description of each state follows.  CREATING - The session is being started, including acquiring resources.  CREATED - The session has been started.  IDLE - The session is able to accept a calculation.  BUSY - The session is processing another task and is unable to accept a calculation.  TERMINATING - The session is in the process of shutting down.  TERMINATED - The session and its resources are no longer running.  DEGRADED - The session has no healthy coordinators.  FAILED - Due to a failure, the session and its resources are no longer running.
        public let state: SessionState?

        @inlinable
        public init(sessionId: String? = nil, state: SessionState? = nil) {
            self.sessionId = sessionId
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case sessionId = "SessionId"
            case state = "State"
        }
    }

    public struct StopCalculationExecutionRequest: AWSEncodableShape {
        /// The calculation execution UUID.
        public let calculationExecutionId: String

        @inlinable
        public init(calculationExecutionId: String) {
            self.calculationExecutionId = calculationExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, max: 36)
            try self.validate(self.calculationExecutionId, name: "calculationExecutionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case calculationExecutionId = "CalculationExecutionId"
        }
    }

    public struct StopCalculationExecutionResponse: AWSDecodableShape {
        ///  CREATING - The calculation is in the process of being created.  CREATED - The calculation has been created and is ready to run.  QUEUED - The calculation has been queued for processing.  RUNNING - The calculation is running.  CANCELING - A request to cancel the calculation has been received and the system is working to stop it.  CANCELED - The calculation is no longer running as the result of a cancel request.  COMPLETED - The calculation has completed without error.  FAILED - The calculation failed and is no longer running.
        public let state: CalculationExecutionState?

        @inlinable
        public init(state: CalculationExecutionState? = nil) {
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
        }
    }

    public struct StopQueryExecutionInput: AWSEncodableShape {
        /// The unique ID of the query execution to stop.
        public let queryExecutionId: String

        @inlinable
        public init(queryExecutionId: String = StopQueryExecutionInput.idempotencyToken()) {
            self.queryExecutionId = queryExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, max: 128)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, min: 1)
            try self.validate(self.queryExecutionId, name: "queryExecutionId", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case queryExecutionId = "QueryExecutionId"
        }
    }

    public struct StopQueryExecutionOutput: AWSDecodableShape {
        public init() {}
    }

    public struct TableMetadata: AWSDecodableShape {
        /// A list of the columns in the table.
        public let columns: [Column]?
        /// The time that the table was created.
        public let createTime: Date?
        /// The last time the table was accessed.
        public let lastAccessTime: Date?
        /// The name of the table.
        public let name: String
        /// A set of custom key/value pairs for table properties.
        public let parameters: [String: String]?
        /// A list of the partition keys in the table.
        public let partitionKeys: [Column]?
        /// The type of table. In Athena, only EXTERNAL_TABLE is supported.
        public let tableType: String?

        @inlinable
        public init(columns: [Column]? = nil, createTime: Date? = nil, lastAccessTime: Date? = nil, name: String, parameters: [String: String]? = nil, partitionKeys: [Column]? = nil, tableType: String? = nil) {
            self.columns = columns
            self.createTime = createTime
            self.lastAccessTime = lastAccessTime
            self.name = name
            self.parameters = parameters
            self.partitionKeys = partitionKeys
            self.tableType = tableType
        }

        private enum CodingKeys: String, CodingKey {
            case columns = "Columns"
            case createTime = "CreateTime"
            case lastAccessTime = "LastAccessTime"
            case name = "Name"
            case parameters = "Parameters"
            case partitionKeys = "PartitionKeys"
            case tableType = "TableType"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
        public let key: String?
        /// A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
        public let value: String?

        @inlinable
        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceInput: AWSEncodableShape {
        /// Specifies the ARN of the Athena resource to which tags are to be added.
        public let resourceARN: String
        /// A collection of one or more tags, separated by commas, to be added to an Athena resource.
        public let tags: [Tag]

        @inlinable
        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct TerminateSessionRequest: AWSEncodableShape {
        /// The session ID.
        public let sessionId: String

        @inlinable
        public init(sessionId: String) {
            self.sessionId = sessionId
        }

        public func validate(name: String) throws {
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case sessionId = "SessionId"
        }
    }

    public struct TerminateSessionResponse: AWSDecodableShape {
        /// The state of the session. A description of each state follows.  CREATING - The session is being started, including acquiring resources.  CREATED - The session has been started.  IDLE - The session is able to accept a calculation.  BUSY - The session is processing another task and is unable to accept a calculation.  TERMINATING - The session is in the process of shutting down.  TERMINATED - The session and its resources are no longer running.  DEGRADED - The session has no healthy coordinators.  FAILED - Due to a failure, the session and its resources are no longer running.
        public let state: SessionState?

        @inlinable
        public init(state: SessionState? = nil) {
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
        }
    }

    public struct TooManyRequestsException: AWSErrorShape {
        public let message: String?
        public let reason: ThrottleReason?

        @inlinable
        public init(message: String? = nil, reason: ThrottleReason? = nil) {
            self.message = message
            self.reason = reason
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case reason = "Reason"
        }
    }

    public struct UnprocessedNamedQueryId: AWSDecodableShape {
        /// The error code returned when the processing request for the named query failed, if applicable.
        public let errorCode: String?
        /// The error message returned when the processing request for the named query failed, if applicable.
        public let errorMessage: String?
        /// The unique identifier of the named query.
        public let namedQueryId: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil, namedQueryId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.namedQueryId = namedQueryId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case namedQueryId = "NamedQueryId"
        }
    }

    public struct UnprocessedPreparedStatementName: AWSDecodableShape {
        /// The error code returned when the request for the prepared statement failed.
        public let errorCode: String?
        /// The error message containing the reason why the prepared statement could not be returned. The following error messages are possible:    INVALID_INPUT - The name of the prepared statement that was provided is not valid (for example, the name is too long).    STATEMENT_NOT_FOUND - A prepared statement with the name provided could not be found.    UNAUTHORIZED - The requester does not have permission to access the workgroup that contains the prepared statement.
        public let errorMessage: String?
        /// The name of a prepared statement that could not be returned due to an error.
        public let statementName: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil, statementName: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.statementName = statementName
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case statementName = "StatementName"
        }
    }

    public struct UnprocessedQueryExecutionId: AWSDecodableShape {
        /// The error code returned when the query execution failed to process, if applicable.
        public let errorCode: String?
        /// The error message returned when the query execution failed to process, if applicable.
        public let errorMessage: String?
        /// The unique identifier of the query execution.
        public let queryExecutionId: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil, queryExecutionId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.queryExecutionId = queryExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case queryExecutionId = "QueryExecutionId"
        }
    }

    public struct UntagResourceInput: AWSEncodableShape {
        /// Specifies the ARN of the resource from which tags are to be removed.
        public let resourceARN: String
        /// A comma-separated list of one or more tag keys whose tags are to be removed from the specified resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateCapacityReservationInput: AWSEncodableShape {
        /// The name of the capacity reservation.
        public let name: String
        /// The new number of requested data processing units.
        public let targetDpus: Int

        @inlinable
        public init(name: String, targetDpus: Int) {
            self.name = name
            self.targetDpus = targetDpus
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
            try self.validate(self.targetDpus, name: "targetDpus", parent: name, min: 24)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case targetDpus = "TargetDpus"
        }
    }

    public struct UpdateCapacityReservationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateDataCatalogInput: AWSEncodableShape {
        /// New or modified text that describes the data catalog.
        public let description: String?
        /// The name of the data catalog to update. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.
        public let name: String
        /// Specifies the Lambda function or functions to use for updating the data catalog. This is a mapping whose values depend on the catalog type.    For the HIVE data catalog type, use the following syntax. The metadata-function parameter is required. The sdk-version parameter is optional and defaults to the currently supported version.  metadata-function=lambda_arn, sdk-version=version_number     For the LAMBDA data catalog type, use one of the following sets of required parameters, but not both.   If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.  metadata-function=lambda_arn, record-function=lambda_arn     If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.  function=lambda_arn
        public let parameters: [String: String]?
        /// Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, HIVE for an external hive metastore, or GLUE for an Glue Data Catalog.
        public let type: DataCatalogType

        @inlinable
        public init(description: String? = nil, name: String, parameters: [String: String]? = nil, type: DataCatalogType) {
            self.description = description
            self.name = name
            self.parameters = parameters
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.parameters?.forEach {
                try validate($0.key, name: "parameters.key", parent: name, max: 255)
                try validate($0.key, name: "parameters.key", parent: name, min: 1)
                try validate($0.key, name: "parameters.key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
                try validate($0.value, name: "parameters[\"\($0.key)\"]", parent: name, max: 51200)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case parameters = "Parameters"
            case type = "Type"
        }
    }

    public struct UpdateDataCatalogOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateNamedQueryInput: AWSEncodableShape {
        /// The query description.
        public let description: String?
        /// The name of the query.
        public let name: String
        /// The unique identifier (UUID) of the query.
        public let namedQueryId: String
        /// The contents of the query with all query statements.
        public let queryString: String

        @inlinable
        public init(description: String? = nil, name: String, namedQueryId: String, queryString: String) {
            self.description = description
            self.name = name
            self.namedQueryId = namedQueryId
            self.queryString = queryString
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, max: 128)
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, min: 1)
            try self.validate(self.namedQueryId, name: "namedQueryId", parent: name, pattern: "^\\S+$")
            try self.validate(self.queryString, name: "queryString", parent: name, max: 262144)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
            case namedQueryId = "NamedQueryId"
            case queryString = "QueryString"
        }
    }

    public struct UpdateNamedQueryOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateNotebookInput: AWSEncodableShape {
        /// A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// The ID of the notebook to update.
        public let notebookId: String
        /// The updated content for the notebook.
        public let payload: String
        /// The active notebook session ID. Required if the notebook has an active session.
        public let sessionId: String?
        /// The notebook content type. Currently, the only valid type is IPYNB.
        public let type: NotebookType

        @inlinable
        public init(clientRequestToken: String? = nil, notebookId: String, payload: String, sessionId: String? = nil, type: NotebookType) {
            self.clientRequestToken = clientRequestToken
            self.notebookId = notebookId
            self.payload = payload
            self.sessionId = sessionId
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 36)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
            try self.validate(self.notebookId, name: "notebookId", parent: name, max: 36)
            try self.validate(self.notebookId, name: "notebookId", parent: name, min: 1)
            try self.validate(self.notebookId, name: "notebookId", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
            try self.validate(self.payload, name: "payload", parent: name, max: 10485760)
            try self.validate(self.payload, name: "payload", parent: name, min: 1)
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 256)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case notebookId = "NotebookId"
            case payload = "Payload"
            case sessionId = "SessionId"
            case type = "Type"
        }
    }

    public struct UpdateNotebookMetadataInput: AWSEncodableShape {
        /// A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).  This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
        public let clientRequestToken: String?
        /// The name to update the notebook to.
        public let name: String
        /// The ID of the notebook to update the metadata for.
        public let notebookId: String

        @inlinable
        public init(clientRequestToken: String? = nil, name: String, notebookId: String) {
            self.clientRequestToken = clientRequestToken
            self.name = name
            self.notebookId = notebookId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 36)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!.*[/:\\\\])[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]+$")
            try self.validate(self.notebookId, name: "notebookId", parent: name, max: 36)
            try self.validate(self.notebookId, name: "notebookId", parent: name, min: 1)
            try self.validate(self.notebookId, name: "notebookId", parent: name, pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case name = "Name"
            case notebookId = "NotebookId"
        }
    }

    public struct UpdateNotebookMetadataOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateNotebookOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdatePreparedStatementInput: AWSEncodableShape {
        /// The description of the prepared statement.
        public let description: String?
        /// The query string for the prepared statement.
        public let queryStatement: String
        /// The name of the prepared statement.
        public let statementName: String
        /// The workgroup for the prepared statement.
        public let workGroup: String

        @inlinable
        public init(description: String? = nil, queryStatement: String, statementName: String, workGroup: String) {
            self.description = description
            self.queryStatement = queryStatement
            self.statementName = statementName
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.queryStatement, name: "queryStatement", parent: name, max: 262144)
            try self.validate(self.queryStatement, name: "queryStatement", parent: name, min: 1)
            try self.validate(self.statementName, name: "statementName", parent: name, max: 256)
            try self.validate(self.statementName, name: "statementName", parent: name, min: 1)
            try self.validate(self.statementName, name: "statementName", parent: name, pattern: "^[a-zA-Z_][a-zA-Z0-9_@:]{1,256}$")
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case queryStatement = "QueryStatement"
            case statementName = "StatementName"
            case workGroup = "WorkGroup"
        }
    }

    public struct UpdatePreparedStatementOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateWorkGroupInput: AWSEncodableShape {
        /// Contains configuration updates for an Athena SQL workgroup.
        public let configurationUpdates: WorkGroupConfigurationUpdates?
        /// The workgroup description.
        public let description: String?
        /// The workgroup state that will be updated for the given workgroup.
        public let state: WorkGroupState?
        /// The specified workgroup that will be updated.
        public let workGroup: String

        @inlinable
        public init(configurationUpdates: WorkGroupConfigurationUpdates? = nil, description: String? = nil, state: WorkGroupState? = nil, workGroup: String) {
            self.configurationUpdates = configurationUpdates
            self.description = description
            self.state = state
            self.workGroup = workGroup
        }

        public func validate(name: String) throws {
            try self.configurationUpdates?.validate(name: "\(name).configurationUpdates")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.workGroup, name: "workGroup", parent: name, pattern: "^[a-zA-Z0-9._-]{1,128}$")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationUpdates = "ConfigurationUpdates"
            case description = "Description"
            case state = "State"
            case workGroup = "WorkGroup"
        }
    }

    public struct UpdateWorkGroupOutput: AWSDecodableShape {
        public init() {}
    }

    public struct WorkGroup: AWSDecodableShape {
        /// The configuration of the workgroup, which includes the location in Amazon S3 where query and calculation results are stored, the encryption configuration, if any, used for query and calculation results; whether the Amazon CloudWatch Metrics are enabled for the workgroup; whether workgroup settings override client-side settings; and the data usage limits for the amount of data scanned per query or per workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
        public let configuration: WorkGroupConfiguration?
        /// The date and time the workgroup was created.
        public let creationTime: Date?
        /// The workgroup description.
        public let description: String?
        /// The ARN of the IAM Identity Center enabled application associated with the workgroup.
        public let identityCenterApplicationArn: String?
        /// The workgroup name.
        public let name: String
        /// The state of the workgroup: ENABLED or DISABLED.
        public let state: WorkGroupState?

        @inlinable
        public init(configuration: WorkGroupConfiguration? = nil, creationTime: Date? = nil, description: String? = nil, identityCenterApplicationArn: String? = nil, name: String, state: WorkGroupState? = nil) {
            self.configuration = configuration
            self.creationTime = creationTime
            self.description = description
            self.identityCenterApplicationArn = identityCenterApplicationArn
            self.name = name
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case creationTime = "CreationTime"
            case description = "Description"
            case identityCenterApplicationArn = "IdentityCenterApplicationArn"
            case name = "Name"
            case state = "State"
        }
    }

    public struct WorkGroupConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies a user defined JSON string that is passed to the notebook engine.
        public let additionalConfiguration: String?
        /// The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
        public let bytesScannedCutoffPerQuery: Int64?
        /// Specifies the KMS key that is used to encrypt the user's data stores in Athena. This setting does not apply to Athena SQL workgroups.
        public let customerContentEncryptionConfiguration: CustomerContentEncryptionConfiguration?
        /// Enforces a minimal level of encryption for the workgroup for query and calculation results that are written to Amazon S3. When enabled, workgroup users can set encryption only to the minimum level set by the administrator or higher when they submit queries. The EnforceWorkGroupConfiguration setting takes precedence over the EnableMinimumEncryptionConfiguration flag. This means that if EnforceWorkGroupConfiguration is true, the EnableMinimumEncryptionConfiguration flag is ignored, and the workgroup configuration for encryption is used.
        public let enableMinimumEncryptionConfiguration: Bool?
        /// If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings.
        public let enforceWorkGroupConfiguration: Bool?
        /// The engine version that all queries running on the workgroup use. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.
        public let engineVersion: EngineVersion?
        /// The ARN of the execution role used to access user resources for Spark sessions and IAM Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and IAM Identity Center enabled workgroups. The property is required for IAM Identity Center enabled workgroups.
        public let executionRole: String?
        /// Specifies whether the workgroup is IAM Identity Center supported.
        public let identityCenterConfiguration: IdentityCenterConfiguration?
        ///  The configuration for storing results in Athena owned storage, which includes whether this feature is enabled; whether encryption configuration, if any, is used for encrypting query results.
        public let managedQueryResultsConfiguration: ManagedQueryResultsConfiguration?
        /// Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
        public let publishCloudWatchMetricsEnabled: Bool?
        /// Specifies whether Amazon S3 access grants are enabled for query results.
        public let queryResultsS3AccessGrantsConfiguration: QueryResultsS3AccessGrantsConfiguration?
        /// If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is false. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.
        public let requesterPaysEnabled: Bool?
        /// The configuration for the workgroup, which includes the location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query and calculation results. To run the query, you must specify the query results location using one of the ways: either in the workgroup using this setting, or for individual queries (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error that no output location is provided.
        public let resultConfiguration: ResultConfiguration?

        @inlinable
        public init(additionalConfiguration: String? = nil, bytesScannedCutoffPerQuery: Int64? = nil, customerContentEncryptionConfiguration: CustomerContentEncryptionConfiguration? = nil, enableMinimumEncryptionConfiguration: Bool? = nil, enforceWorkGroupConfiguration: Bool? = nil, engineVersion: EngineVersion? = nil, executionRole: String? = nil, identityCenterConfiguration: IdentityCenterConfiguration? = nil, managedQueryResultsConfiguration: ManagedQueryResultsConfiguration? = nil, publishCloudWatchMetricsEnabled: Bool? = nil, queryResultsS3AccessGrantsConfiguration: QueryResultsS3AccessGrantsConfiguration? = nil, requesterPaysEnabled: Bool? = nil, resultConfiguration: ResultConfiguration? = nil) {
            self.additionalConfiguration = additionalConfiguration
            self.bytesScannedCutoffPerQuery = bytesScannedCutoffPerQuery
            self.customerContentEncryptionConfiguration = customerContentEncryptionConfiguration
            self.enableMinimumEncryptionConfiguration = enableMinimumEncryptionConfiguration
            self.enforceWorkGroupConfiguration = enforceWorkGroupConfiguration
            self.engineVersion = engineVersion
            self.executionRole = executionRole
            self.identityCenterConfiguration = identityCenterConfiguration
            self.managedQueryResultsConfiguration = managedQueryResultsConfiguration
            self.publishCloudWatchMetricsEnabled = publishCloudWatchMetricsEnabled
            self.queryResultsS3AccessGrantsConfiguration = queryResultsS3AccessGrantsConfiguration
            self.requesterPaysEnabled = requesterPaysEnabled
            self.resultConfiguration = resultConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.additionalConfiguration, name: "additionalConfiguration", parent: name, max: 128)
            try self.validate(self.additionalConfiguration, name: "additionalConfiguration", parent: name, min: 1)
            try self.validate(self.bytesScannedCutoffPerQuery, name: "bytesScannedCutoffPerQuery", parent: name, min: 10000000)
            try self.customerContentEncryptionConfiguration?.validate(name: "\(name).customerContentEncryptionConfiguration")
            try self.engineVersion?.validate(name: "\(name).engineVersion")
            try self.validate(self.executionRole, name: "executionRole", parent: name, max: 2048)
            try self.validate(self.executionRole, name: "executionRole", parent: name, min: 20)
            try self.validate(self.executionRole, name: "executionRole", parent: name, pattern: "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$")
            try self.identityCenterConfiguration?.validate(name: "\(name).identityCenterConfiguration")
            try self.managedQueryResultsConfiguration?.validate(name: "\(name).managedQueryResultsConfiguration")
            try self.resultConfiguration?.validate(name: "\(name).resultConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalConfiguration = "AdditionalConfiguration"
            case bytesScannedCutoffPerQuery = "BytesScannedCutoffPerQuery"
            case customerContentEncryptionConfiguration = "CustomerContentEncryptionConfiguration"
            case enableMinimumEncryptionConfiguration = "EnableMinimumEncryptionConfiguration"
            case enforceWorkGroupConfiguration = "EnforceWorkGroupConfiguration"
            case engineVersion = "EngineVersion"
            case executionRole = "ExecutionRole"
            case identityCenterConfiguration = "IdentityCenterConfiguration"
            case managedQueryResultsConfiguration = "ManagedQueryResultsConfiguration"
            case publishCloudWatchMetricsEnabled = "PublishCloudWatchMetricsEnabled"
            case queryResultsS3AccessGrantsConfiguration = "QueryResultsS3AccessGrantsConfiguration"
            case requesterPaysEnabled = "RequesterPaysEnabled"
            case resultConfiguration = "ResultConfiguration"
        }
    }

    public struct WorkGroupConfigurationUpdates: AWSEncodableShape {
        /// Contains a user defined string in JSON format for a Spark-enabled workgroup.
        public let additionalConfiguration: String?
        /// The upper limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
        public let bytesScannedCutoffPerQuery: Int64?
        public let customerContentEncryptionConfiguration: CustomerContentEncryptionConfiguration?
        /// Enforces a minimal level of encryption for the workgroup for query and calculation results that are written to Amazon S3. When enabled, workgroup users can set encryption only to the minimum level set by the administrator or higher when they submit queries. This setting does not apply to Spark-enabled workgroups. The EnforceWorkGroupConfiguration setting takes precedence over the EnableMinimumEncryptionConfiguration flag. This means that if EnforceWorkGroupConfiguration is true, the EnableMinimumEncryptionConfiguration flag is ignored, and the workgroup configuration for encryption is used.
        public let enableMinimumEncryptionConfiguration: Bool?
        /// If set to "true", the settings for the workgroup override client-side settings. If set to "false" client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings.
        public let enforceWorkGroupConfiguration: Bool?
        /// The engine version requested when a workgroup is updated. After the update, all queries on the workgroup run on the requested engine version. If no value was previously set, the default is Auto. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.
        public let engineVersion: EngineVersion?
        /// The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
        public let executionRole: String?
        /// Updates configuration information for managed query results in the workgroup.
        public let managedQueryResultsConfigurationUpdates: ManagedQueryResultsConfigurationUpdates?
        /// Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
        public let publishCloudWatchMetricsEnabled: Bool?
        /// Specifies whether Amazon S3 access grants are enabled for query results.
        public let queryResultsS3AccessGrantsConfiguration: QueryResultsS3AccessGrantsConfiguration?
        /// Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery
        public let removeBytesScannedCutoffPerQuery: Bool?
        /// Removes content encryption configuration from an Apache Spark-enabled Athena workgroup.
        public let removeCustomerContentEncryptionConfiguration: Bool?
        /// If set to true, allows members assigned to a workgroup to specify Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is false. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.
        public let requesterPaysEnabled: Bool?
        /// The result configuration information about the queries in this workgroup that will be updated. Includes the updated results location and an updated option for encrypting query results.
        public let resultConfigurationUpdates: ResultConfigurationUpdates?

        @inlinable
        public init(additionalConfiguration: String? = nil, bytesScannedCutoffPerQuery: Int64? = nil, customerContentEncryptionConfiguration: CustomerContentEncryptionConfiguration? = nil, enableMinimumEncryptionConfiguration: Bool? = nil, enforceWorkGroupConfiguration: Bool? = nil, engineVersion: EngineVersion? = nil, executionRole: String? = nil, managedQueryResultsConfigurationUpdates: ManagedQueryResultsConfigurationUpdates? = nil, publishCloudWatchMetricsEnabled: Bool? = nil, queryResultsS3AccessGrantsConfiguration: QueryResultsS3AccessGrantsConfiguration? = nil, removeBytesScannedCutoffPerQuery: Bool? = nil, removeCustomerContentEncryptionConfiguration: Bool? = nil, requesterPaysEnabled: Bool? = nil, resultConfigurationUpdates: ResultConfigurationUpdates? = nil) {
            self.additionalConfiguration = additionalConfiguration
            self.bytesScannedCutoffPerQuery = bytesScannedCutoffPerQuery
            self.customerContentEncryptionConfiguration = customerContentEncryptionConfiguration
            self.enableMinimumEncryptionConfiguration = enableMinimumEncryptionConfiguration
            self.enforceWorkGroupConfiguration = enforceWorkGroupConfiguration
            self.engineVersion = engineVersion
            self.executionRole = executionRole
            self.managedQueryResultsConfigurationUpdates = managedQueryResultsConfigurationUpdates
            self.publishCloudWatchMetricsEnabled = publishCloudWatchMetricsEnabled
            self.queryResultsS3AccessGrantsConfiguration = queryResultsS3AccessGrantsConfiguration
            self.removeBytesScannedCutoffPerQuery = removeBytesScannedCutoffPerQuery
            self.removeCustomerContentEncryptionConfiguration = removeCustomerContentEncryptionConfiguration
            self.requesterPaysEnabled = requesterPaysEnabled
            self.resultConfigurationUpdates = resultConfigurationUpdates
        }

        public func validate(name: String) throws {
            try self.validate(self.additionalConfiguration, name: "additionalConfiguration", parent: name, max: 128)
            try self.validate(self.additionalConfiguration, name: "additionalConfiguration", parent: name, min: 1)
            try self.validate(self.bytesScannedCutoffPerQuery, name: "bytesScannedCutoffPerQuery", parent: name, min: 10000000)
            try self.customerContentEncryptionConfiguration?.validate(name: "\(name).customerContentEncryptionConfiguration")
            try self.engineVersion?.validate(name: "\(name).engineVersion")
            try self.validate(self.executionRole, name: "executionRole", parent: name, max: 2048)
            try self.validate(self.executionRole, name: "executionRole", parent: name, min: 20)
            try self.validate(self.executionRole, name: "executionRole", parent: name, pattern: "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$")
            try self.managedQueryResultsConfigurationUpdates?.validate(name: "\(name).managedQueryResultsConfigurationUpdates")
            try self.resultConfigurationUpdates?.validate(name: "\(name).resultConfigurationUpdates")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalConfiguration = "AdditionalConfiguration"
            case bytesScannedCutoffPerQuery = "BytesScannedCutoffPerQuery"
            case customerContentEncryptionConfiguration = "CustomerContentEncryptionConfiguration"
            case enableMinimumEncryptionConfiguration = "EnableMinimumEncryptionConfiguration"
            case enforceWorkGroupConfiguration = "EnforceWorkGroupConfiguration"
            case engineVersion = "EngineVersion"
            case executionRole = "ExecutionRole"
            case managedQueryResultsConfigurationUpdates = "ManagedQueryResultsConfigurationUpdates"
            case publishCloudWatchMetricsEnabled = "PublishCloudWatchMetricsEnabled"
            case queryResultsS3AccessGrantsConfiguration = "QueryResultsS3AccessGrantsConfiguration"
            case removeBytesScannedCutoffPerQuery = "RemoveBytesScannedCutoffPerQuery"
            case removeCustomerContentEncryptionConfiguration = "RemoveCustomerContentEncryptionConfiguration"
            case requesterPaysEnabled = "RequesterPaysEnabled"
            case resultConfigurationUpdates = "ResultConfigurationUpdates"
        }
    }

    public struct WorkGroupSummary: AWSDecodableShape {
        /// The workgroup creation date and time.
        public let creationTime: Date?
        /// The workgroup description.
        public let description: String?
        /// The engine version setting for all queries on the workgroup. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.
        public let engineVersion: EngineVersion?
        /// The ARN of the IAM Identity Center enabled application associated with the workgroup.
        public let identityCenterApplicationArn: String?
        /// The name of the workgroup.
        public let name: String?
        /// The state of the workgroup.
        public let state: WorkGroupState?

        @inlinable
        public init(creationTime: Date? = nil, description: String? = nil, engineVersion: EngineVersion? = nil, identityCenterApplicationArn: String? = nil, name: String? = nil, state: WorkGroupState? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.engineVersion = engineVersion
            self.identityCenterApplicationArn = identityCenterApplicationArn
            self.name = name
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case description = "Description"
            case engineVersion = "EngineVersion"
            case identityCenterApplicationArn = "IdentityCenterApplicationArn"
            case name = "Name"
            case state = "State"
        }
    }
}

// MARK: - Errors

/// Error enum for Athena
public struct AthenaErrorType: AWSErrorType {
    enum Code: String {
        case internalServerException = "InternalServerException"
        case invalidRequestException = "InvalidRequestException"
        case metadataException = "MetadataException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case sessionAlreadyExistsException = "SessionAlreadyExistsException"
        case tooManyRequestsException = "TooManyRequestsException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Athena
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Indicates a platform issue, which may be due to a transient condition or outage.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
    /// An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.
    public static var metadataException: Self { .init(.metadataException) }
    /// A resource, such as a workgroup, was not found.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The specified session already exists.
    public static var sessionAlreadyExistsException: Self { .init(.sessionAlreadyExistsException) }
    /// Indicates that the request was throttled.
    public static var tooManyRequestsException: Self { .init(.tooManyRequestsException) }
}

extension AthenaErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "InvalidRequestException": Athena.InvalidRequestException.self,
        "ResourceNotFoundException": Athena.ResourceNotFoundException.self,
        "TooManyRequestsException": Athena.TooManyRequestsException.self
    ]
}

extension AthenaErrorType: Equatable {
    public static func == (lhs: AthenaErrorType, rhs: AthenaErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension AthenaErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
